MathLabs

Problem 3

Determine the maximum value of m2+n2m^2+n^2, where mm and nn are integers satisfying m,n∈{1,2,…,1981}m, n \in \{1, 2, \ldots, 1981\} and (n2−mn−m2)2=1(n^2-mn-m^2)^2 = 1.
Step 3 of 6: Descend by the Euclidean algorithm
In plain words

Just as the Euclidean algorithm reduces a pair of integers step by step to their gcd, this descent reduces any solution pair down to the base of the Fibonacci sequence.

(m,n)↦(n−m,m) reverses the recurrence(m,n) \mapsto (n-m, m) \text{ reverses the recurrence}
Detailed analysis

Running Step 2's relation backwards, from any solution (m,n)(m,n) with n>m>1n>m>1 we obtain a smaller solution (n−m,m)(n-m,m). Since m,nm,n are positive integers, this descent must terminate; it can only stop at the smallest solutions, which by direct check are (1,1)(1,1) and (1,2)(1,2).