Maths Olympiad Prep

Library / /2 of 33

, 2011

Number theory Difficulty 7.5 National Olympiad, round 2 Prove it Baltic Way

Determine all pairs (p,q)(p, q) of primes for which both p2+q3p^2 + q^3 and q2+p3q^2 + p^3 are perfect squares.

Solution

Answer. There is only one such pair, namely (p,q)=(3,3)(p, q) = (3, 3).

Proof. Let the pair (p,q)(p, q) be as described in the statement of the problem.

1.) First we show that p2p \neq 2. Otherwise, there would exist a prime qq for which q2+8q^2 + 8 and q3+4q^3 + 4 are perfect squares. Because of q2<q2+8q^2 < q^2 + 8, the second condition gives (q+1)2q2+8(q+1)^2 \le q^2 + 8 and hence q3q \le 3. But for q=2q = 2 or q=3q = 3 the expression q3+4q^3 + 4 fails to be a perfect square. Hence indeed p2p \neq 2 and due to symmetry we also have q2q \neq 2.

2.) Next we consider the special case p=qp = q. Then p2(p+1)p^2(p+1) is a perfect square, for which reason there exists an integer nn satisfying p=n21=(n+1)(n1)p = n^2 - 1 = (n+1)(n-1). Since pp is prime, this factorization yields n=2n = 2 and thus p=3p = 3. This completes the discussion of the case p=qp = q.

3.) So from now on we may suppose that pp and qq are distinct odd prime. Let aa be a positive integer such that p2+q3=a2p^2 + q^3 = a^2, i.e. q3=(a+p)(ap)q^3 = (a+p)(a-p). If both factors a+pa+p and apa-p were divisible by qq, then so were their difference 2p2p, which is absurd. So by uniqueness of prime factorization we have a+p=q3a+p = q^3 and ap=1a-p = 1. Subtracting these equations we learn q3=2p+1q^3 = 2p+1. Due to symmetry we also have p3=2q+1p^3 = 2q+1. Now if p<qp < q, then q3=2p+1<2q+1=p3q^3 = 2p+1 < 2q+1 = p^3, which gives a contradiction, and the case q<pq < p is excluded similarly.

Thereby the problem is solved.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.