15th Irish 2002 Problem A3 Find all positive integer solutions to p(p+3) + q(q+3) = n(n+3), where p and q are primes.
(p,q,n) = (2,3,4), (3,2,4), (3,7,8), (7,3,8). Solution rhs = n 2 = 0 or 1 mod 3. lhs = p 2 + q 2 = 2 mod 3 unless one of p, q is 3. So wlog p = 3. We have n ≥ q+1, so n(n+3) - q(q+3) ≥ 2q+4 > 3(3+3) unless q ≤ 7. Checking, we find that q = 2 and q = 7 are the only solutions with q ≤ 7. Many thanks to Gerhard Woeginger for this. 15th Irish 2002 © John Scholes jscholes@kalva.demon.co.uk 27 Oct 2003 Last updated/corrected 27 Oct 03