Maths Olympiad Prep

Library / Slovenia — National Math Olympiad /64 of 122

Slovenia — National Math Olympiad

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=m2−p2=(m−p)(m+p)7^n = m^2 - p^2 = (m - p)(m + p). We consider two possible cases.

If m−p=1m - p = 1 and m+p=7nm + p = 7^n, then 2p=7n−12p = 7^n - 1. Assume that n≥2n \ge 2. Then 2p=7n−1=(7−1)(7n−1+7n−2+⋯+7+1)2p = 7^n - 1 = (7 - 1)(7^{n-1} + 7^{n-2} + \dots + 7 + 1), so p=3(7n−1+7n−2+⋯+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 m−p=7km - p = 7^k and m+p=7n−km + p = 7^{n-k}, where kk is a positive integer. Obviously n−k>kn - k > k. Hence 2p=7n−k−7k=7k(7n−2k−1)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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

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