(Indian Olympiad Qualifier in Mathematics 2020, Q13, non-traité)

Find all natural numbers $n, x$ such that $2^{n}+5^{n}=x^{2}+65$.
Suppose that $(n, x)$ is a solution. Modulo 3, we notice that $2 \times(-1)^{n} \equiv x^{2}+2$ so $x^{2} \equiv 2\left((-1)^{n}-1\right)$. Since a square is 0 or 1 modulo 3, necessarily $x \equiv 0(\bmod 3)$ and $n$ is even. Therefore, there exists $m \in \mathbb{N}$ such that $n=2 m$.

Then $\left(5^{m}\right)^{2}+4^{m}-65=x^{2}$.

If $m \geq 4$, then $4^{m}-65>0$. Therefore, $\left(5^{m}\right)^{2}<x^{2}=5^{2 m}+4^{m}-65<5^{2 m}+2 \times 5^{m}+1=\left(5^{m}+1\right)^{2}$, which is absurd.

Thus, $0 \leq m \leq 3$.

We test:

| $m$ | $5^{2 m}+2^{2 m}-65$ | Perfect square? |
| :---: | :---: | :---: |
| 0 | -63 | no |
| 1 | -36 | no |
| 2 | $576=24^{2}$ | YES |
| 3 | 15624 | no |

Finally, there is a unique solution $(n, x)=(4,24)$.