11th APMO 1999 Problem 4 Find all pairs of integers m, n such that m 2 + 4n and n 2 +4m are both squares. Solution
: (m, n) or (n, m) = (0, a 2 ), (-5, -6), (-4, -4), (a+1, -a) where a is a non-negative integer. Clearly if one of m, n is zero, then the other must be a square and that is a solution. If both are positive, then m 2 + 4n must be (m + 2k) 2 for some positive k, so n = km + k 2 > m. But similarly m > n. Contradiction. So there are no solutions with m and n positive. Suppose both are negative. Put m = -M, n = -N, so M and N are both positive. Assume M >= N. M 2 - 4N is a square, so it must be (M - 2k) 2 for some k, so N = Mk - k 2 . If M = N, then M(k-1) = k 2 , so k-1 divides k 2 and hence k 2 - (k-1)(k+1) = 1, so k = 2 and M = 4, giving the solution (m, n) = (-4, -4). So we may assume M > N and hence M > Mk - k 2 > 0. But that implies that k = 1 or M-1 and hence N = M-1. [If M > Mk - k 2 , then (k-1)M  0, so M > k. Hence k = 1 or M = k+1.]. But N 2 - 4M is also a square, so (M-1) 2 - 4M = M 2 - 6M + 1 is a square. But (M-3) 2 > M 2 - 6M + 1 and (M-4) 2 = 8, so the only possible solutions are M = 1, 2, ... , 7. Checking, we find that only M = 6 gives M 2 - 6M + 1 a square. This gives the soluton (m, n) = (-6, -5). Obviously, there is also the solution (-5, -6). Finally, consider the case of opposite signs. Suppose m = M > 0, n = -N  N. But M 2 - 4N is a square and so the argument above gives N = M-1. Now we can easily check that (m, n) = (M, -(M-1) ) is a solution for any positive M. 11th APMO 1999 (C) John Scholes jscholes@kalva.demon.co.uk 14 Apr 2002