37th IMO 1996 shortlist Problem 22 Find all positive integers m and n such that [m 2 /n] + [n 2 /m] = [m/n + n/m] + mn. Solution
: (m, n) = (k, k 2 + 1) or (k 2 + 1, k) for any positive integer k. Put m = n 2 + 1. If n > 1, then lhs = [n 3 + 2n + 1/n] + [n 2 /(n 2 + 1] = n 3 + 2n, and rhs = [n + 1/n + n/(n 2 + 1)] + n 3 + n = n 3 + 2n, so we have a solution. It is easy to check that n = 1 also gives a solution. Obviously there is symmetry between m and n, so n = m 2 + 1 is also a solution. We now show that there are no other solutions. Without loss of generality we may assume n ≥ m. Now regard m as fixed and put f(n) = [m 2 /n] + [n 2 /m] - [m/n + n/m] - mn. Put g(n) = m 2 /n + n 2 /m - m/n - n/m - mn. So |g(n) - f(n)|  m. Hence f(n) > m-3. So for m > 2 there are no solutions for n > m 2 + 1. Also if m ≤ n ≤ m 2 - 1, then (n - (m 2 +1)/2) 2 ≤ (m 2 - 3) 2 /4 and (m 2 -m)/n ≤ (m-1), so g(n) ≤ -m + 2/m - 1  2. So for m > 2 there are no solutions for n  1, then f(n) = 0 + n 2 - n - n = n(n - 2). So for m = 1, the only solution is n = 2. So finally take m = 2 and consider n >= 2. It is easy to check that f(2) = -2, f(3) = -3, f(4) = -1. For n ≥ 6, we have f(n) = 0 + [n 2 /2] - [n/2] - 2n ≥ n 2 /2 - 1/2 - 5n/2 > 0. 37th IMO shortlist 1996 © John Scholes jscholes@kalva.demon.co.uk 16 Dec 2002