Problem

Source: IMO LongList, Federal Republic Of Germany 1, IMO 1977, Day 2, Problem 5

Tags: number theory, Additive Number Theory, remainder, Divisibility, IMO, IMO 1977



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.$