6th APMC 1983 Problem 2 Find all primes p, q such that p(p+1) + q(q+1) = n(n+1) for some positive integer n.
(p,q,n) = (3,5,6), (5,3,6), (2,2,3) Solution p(p+1) = (n-q)(n+q+1). So p divides n-q or n+q+1. If p divides n-q, then n-q ≥ p, so n+q+1 > p+1. Contradiction. So n+q+1 = kp for some positive integer k, and hence p+1 = k(n-q). We have (p+q)(p+q+1) = p(p+1) + q(q+1) + 2pq > n(n+1), so n  p(p+1), we have n > p. Now kp > n > p, so k > 1. Also kp < (p+q)+q+1 ≤ 3p+1 < 4p. So k = 2 or 3. If k = 2, then n = 2p-q-1, and p+1 = k(n-q) gives 3(p-1) = 4q. So 3 divides q and hence q = 3. So p = 5 and n = 6. If k = 3, then n = 3p-q-1, and 2(2p-1) = 3q, so q = 2 and p = 2, giving n = 3. Thanks to Suat Namli 6th APMC 1983 © John Scholes jscholes@kalva.demon.co.uk 14 February 2004 Last corrected/updated 14 Feb 04