I did not find algebraic manipulation or attempts to factor helpful except:
setting m=n gives 2 solutions: (0,0) and (-1,-1) (rejecting the first due to the nonzero stipulation)
Program output with zero excluded
(-1, -1)
(-1, 2)
(2, -1)
If the nonzero stipulation were to be ignored, there would be 3 additional solutions:
(0, 0)
(0, 1)
(1, 0)
-------------
for m in range(-100,100):
# if m == 0:
# continue
for n in range(-big,big):
# if n == 0:
# continue
if (m**2 + n)*(m + n**2) == (m - n)**2:
print('({}, {})'.format(m,n))
|
Posted by Larry
on 2023-11-19 15:27:12 |