IMO 1977 Problem B2 Let a and b be positive integers. When a 2 + b 2 is divided by a + b, the quotient is q and the remainder is r. Find all pairs a, b such that q 2 + r = 1977.
a 2 + b 2 >= (a + b) 2 /2, so q ≥ (a + b)/2. Hence r  2.43. So we must have q = 44, r = 41. Hence a 2 + b 2 = 44(a + b) + 41, so (a - 22) 2 + (b - 22) 2 = 1009. By trial, we find that the only squares with sum 1009 are 28 2 and 15 2 . This gives two solutions 50, 37 or 50, 7. s are also available in: Samuel L Greitzer, International Mathematical Olympiads 1959-1977, MAA 1978, and in István Reiman, International Mathematical Olympiad 1959-1999, ISBN 189-8855-48- X. 19th IMO 1977 © John Scholes jscholes@kalva.demon.co.uk 12 Oct 1998