for tot=-99999:99999
for n=-99999:999
m=tot-n;
if (m^2+n)*(m+n^2)==(m-n)^2
disp([m n (m-n)^2])
end
end
end
finds only
>> findAllPossiblePairs
-1 -1 0
0 0 0
2 -1 9
1 0 1
0 1 1
-1 2 9
but there may be more beyond the searched bounds.
Excluding the ones that include m or n being zero, what's left are:
m = -1 n = -1 (m-n)^2 = 0
m = 2 n = -1 (m-n)^2 = 9
m = -1 n = 2 (m-n)^2 = 9
|
Posted by Charlie
on 2023-11-19 09:33:18 |