Message Boards Message Boards

0
|
3596 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

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

Posted 12 years ago
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.
POSTED BY: Piers Newberry
2 Replies
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 BY: Piers Newberry
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]
POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract