Combinations of three positive numbers x, y, z, so x + y, x - y, y + z, y - z, x + z and x - z are perfect squares

Good morning, I'm new here, and I bring a little problem. I had trouble developing an efficient algorithm for the following problem: I need to find combinations of three positive numbers x, y and z, so x + y, x - y, y + z, y - z, x + z and x - z - perfect squares. The problem is to develop an algorithm that finds all combinations of x, y and z between 1 and 2,000,000.

Currently, I use forwithin the limits for, which, of course, will not end until I have grandchildren.

+5
source share
2 answers

, :

 u = x + y
 v = x - y
 w = y + z

x + y, x - y, y + z, y - z, x + z x - z

 u, v, w, u - v - w, v + w, u - w   [all have to be squares]

u = a², v = b², w = c², :

 a², b², c², a² - b² - c², b² + c², a² - c²    [all have to be squares]

a, b, c-s, .

, b², c², b² + c², ( m n, (m, n) ), (b, c) (, a² - c² = x² a² = x² + c² ).

+4

BeniBela,

x + y = (x - z) + (y + z)
x + y = (x + z) + (y - z)

, , ​​ . , , (x - z) (x + z) .

0

All Articles