Maths Olympiad Prep

Library / /69 of 129

Number theory Difficulty 5.3 AIME, harder Prove it Slovenia

Find all natural numbers nn for which there exists a prime pp such that p2+7np^2 + 7^n is a perfect square.

Solution

Let p2+7n=m2p^2 + 7^n = m^2. Then 7n=m2p2=(mp)(m+p)7^n = m^2 - p^2 = (m - p)(m + p). We consider two possible cases.

If mp=1m - p = 1 and m+p=7nm + p = 7^n, then 2p=7n12p = 7^n - 1. Assume that n2n \ge 2. Then 2p=7n1=(71)(7n1+7n2++7+1)2p = 7^n - 1 = (7 - 1)(7^{n-1} + 7^{n-2} + \dots + 7 + 1), so p=3(7n1+7n2++7+1)p = 3(7^{n-1} + 7^{n-2} + \dots + 7 + 1), but this is not possible since the expression in brackets is greater than 1. If n=1n = 1, we get p=3p = 3.

In the second case we have mp=7km - p = 7^k and m+p=7nkm + p = 7^{n-k}, where kk is a positive integer. Obviously nk>kn - k > k. Hence 2p=7nk7k=7k(7n2k1)2p = 7^{n-k} - 7^k = 7^k(7^{n-2k} - 1).

The expression in brackets is even and greater than 2, so 2p2p is the product of at least three primes. This is not possible.

We conclude that n=1n = 1 is the only positive integer for which there exists a prime pp such that p2+7np^2 + 7^n is a perfect square. This prime is p=3p = 3 and the perfect square is 32+7=16=423^2 + 7 = 16 = 4^2.

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.