IMO Shortlist 1977 problem 3
Dodao/la:
arhiva2. travnja 2012. Let

be two natural numbers. When we divide

by

, we the the remainder

and the quotient

Determine all pairs

for which
%V0
Let $a,b$ be two natural numbers. When we divide $a^2+b^2$ by $a+b$, we the the remainder $r$ and the quotient $q.$ Determine all pairs $(a, b)$ for which $q^2 + r = 1977.$
Izvor: Međunarodna matematička olimpijada, shortlist 1977