All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Explore a diophantine equation (Posted on 2023-08-14) Difficulty: 2 of 5
Given:

2xy+3x+2y=42

  1. Provide all solutions, allowing non-negative values only.
  2. What two-digit numbers can replace 42, so that there will still be non negative solutions for the bolded equation?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 6
clearvars,clc
rhs=[];
for x=0:100
  for y=0:100
    v=2*x*y+3*x+2*y;
    if v>9 && v<100
      rhs=unique([rhs v]);
    end
    if v==42
      disp([x y])
    end
  end
end
length(rhs)
for i=1:length(rhs)
  fprintf('%3d',rhs(i))
  if mod(i,29)==0
    fprintf('\n')
  end
end
nrhs=setdiff(10:99,rhs)
fprintf('\n')

For the RHS = 42:

     x     y
     0    21
     2     6
     4     3
     8     1
    14     0
 
The 87 valid 2-digit values for the right-hand side (including 42) are:
 
10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

that is all 2-digit numbers except

    13    29    61


  Posted by Charlie on 2023-08-14 09:03:19
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information