# I would simply like to refine output so that x*y also equals a square

Posted 10 years ago
3218 Views
|
2 Replies
|
0 Total Likes
|
 I am a bit new to this and have struggled through various problems but this one seems insurmountable after many attempts to solve it.I would just like the output refined such that x*y produces an integer squared.FindInstance[y == (5 n + x)/3 x  && x > 1  && y > 1 && y < 2000 , {x , y}, Integers, 16]So I get various bracketed output values for this for a set value of n but would like it to just reveal xy = z^2 where z is an integer if this is possible.Thanks v much in advance.
2 Replies
Sort By:
Posted 10 years ago
 Yes thanks that's great. I did try something very similar and somehow got an error code. Hey ho, I can get on with it now. Thanks again!
Posted 10 years ago
 Do you mean something similar to In[4]:= With[{n = 100}, FindInstance[y == (5 n + x)/3 x && x > 1 && y > 1 && y < 2000 && z^2 == x y && z > 0, {x, y, z}, Integers]]Out[4]= {{x -> 7, y -> 1183, z -> 91}} We can also use Reduce to get an exhaustive list of solutions, for example Reduce[y == (5 n + x)/3 x && x > 1 && y > 1 && y < 2000 && z^2 == x y && z > 0, {x, y, z}, Integers]