Maths Olympiad Prep

Library / /43 of 82

Number theory Difficulty 5.6 AIME, harder Prove it Croatia

Find all prime numbers pp and qq such that
pq+1+qp+1 p^{q+1} + q^{p+1}
is a perfect square.

Solution

If p=q=2p = q = 2 we have pq+1+qp+1=23+23=16p^{q+1} + q^{p+1} = 2^3 + 2^3 = 16, so that is one solution of the problem.

Now, without loss of generality assume that pp is odd and let pq+1+qp+1=x2p^{q+1} + q^{p+1} = x^2, where xNx \in \mathbb{N}. Thus p+1p+1 is even and
pq+1=(xqp+12)(x+qp+12). p^{q+1} = \left(x - q^{\frac{p+1}{2}}\right) \left(x + q^{\frac{p+1}{2}}\right).
Denote the greatest common divisor of the two factors on the right-hand side by dd. If d>1d > 1 we have that dd is a power of pp and dd is also a factor of 2x2x. It is easy to see that pqp \mid q, i.e. p=qp = q. Thus 2pp+1=x22p^{p+1} = x^2, which is impossible.

Therefore d=1d = 1, xqp+12=1x - q^{\frac{p+1}{2}} = 1, x+qp+12=pq+1x + q^{\frac{p+1}{2}} = p^{q+1} and hence
2qp+12=pq+11. 2q^{\frac{p+1}{2}} = p^{q+1} - 1.
The above equation is impossible for qq odd because 2qp+122(mod4)2q^{\frac{p+1}{2}} \equiv 2 \pmod 4 and pq+110(mod4)p^{q+1} - 1 \equiv 0 \pmod 4. We conclude that q=2q = 2 and
2p+32=p31=(p1)(p2+p+1). 2^{\frac{p+3}{2}} = p^3 - 1 = (p-1)(p^2 + p + 1).
Since gcd(p1,p2+p+1)=1\gcd(p-1, p^2 + p + 1) = 1 we conclude that p1=1p-1=1, what is a contradiction.

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 and solution reproduced as published; topic and difficulty added by this site.