Find all positive integers w > x > y > z such that 9w^2+77x, 9x^2+77y, 9y^2+77z and 9z^2+77w are all perfect squares.
It doesn't seem to work unless w, x, y and z are all 11.
for w=1:2000
for x=1:w
sq=9*w^2+77*x;
sr= round(sqrt(sq));
if sr^2==sq
for y=1:x
sq=9*x^2+77*y ;
sr= round(sqrt(sq));
if sr^2==sq
for z=1:y
sq=9*y^2+77*z ;
sr= round(sqrt(sq));
if sr^2==sq
sq=9*z^2+77*w ;
sr= round(sqrt(sq));
if sr^2==sq
disp([w x y z])
end
end
end
end
end
end
end
end
|
Posted by Charlie
on 2023-11-09 18:18:25 |