Number Theory – Integers n for Which |2^n + 5^n – 65| is a Perfect Square

contest-mathelementary-number-theory

Find the sum of all positive integers $n$ for which $|2^n + 5^n– 65|$ is a perfect square.

It is easy to check for $n<3$ only $n=2$ works. Looking at $n≥3$, $2^n + 5^n– 65= a^2$
For odd $n$, LHS has unit digit $2$ or $8$ but RHS has unit digit $0,4$ or $6$. Hence $n$ cannot be odd. For even $n$ we can rewrite our expression as follows ($n=2k$): $$(a – 2^k)(a+2^k)=5(5^{2k–1} – 13)$$

But I wasn't able to finish off after this. Both LHS and RHS have the same unit digit ($0$). Through trial and error I found that $n=4$ works, but $n=6,8$ don't. Since the questions asks for the sum as is common in Olympiad number theory it's highly unlikely that any other larger values satisfy. I also tried some alternative ways like looking at the equation modulo $4$ but that didn't help.

Best Answer

Once you know that $n\geq 3$ must be even, let $ n = 2k$.

Then, apart from finitely many values of $k$,

$$5^{2k} < 5^{2k} + 2^{2k} - 65 < 5^{2k} + 2 \times 5^k + 1. $$

This bounds the expression strictly between 2 consecutive perfect squares, so it cannot be a perfect square.

So, we just need to check those finitely many values, which is left as an exercise to the reader.

Related Question