MathLabs

Problem 5

Let a,ba,b be positive integers. Dividing a2+b2a^2+b^2 by a+ba+b gives quotient qq and remainder rr. Find all pairs (a,b)(a,b) such that q2+r=1977q^2+r=1977.
Step 1 of 4: Bound the divisor and remainder
s=a+b;a2+b2≥s22,r<ss=a+b;\quad a^2+b^2\ge\frac{s^2}{2},\quad r<s
Detailed analysis

Let s=a+bs=a+b. From a2+b2=q(a+b)+ra^2+b^2=q(a+b)+r, the inequality a2+b2≥s22a^2+b^2\ge\frac{s^2}{2} and r<sr<s give s2/2<(q+1)ss^2/2<(q+1)s, hence s<2q+2s<2q+2 and s≤2q+1s\le2q+1. Also r=1977−q2≥0r=1977-q^2\ge0, so q≤44q\le44.