MathDB
n=a^2+b^2=c^2+d^2, a-c=7, d-b=13 (Chile NMO 1999 P1)

Source:

November 27, 2021
number theory

Problem Statement

Pedrito's lucky number is 3411734117. His friend Ramanujan points out that 34117=1662+812=1592+94234117 = 166^2 + 81^2 = 159^2 + 94^2 and 166159=7166-159 = 7, 9481=1394- 81 = 13. Since his lucky number is large, Pedrito decides to find a smaller one, but that satisfies the same properties, that is, write in two different ways as the sum of squares of positive integers, and the difference of the first integers that occur in that sum is 77 and in the difference between the seconds it gives 1313. Which is the least lucky number that Pedrito can find? Find a way to generate all the positive integers with the properties mentioned above.