
NT2. Find all natural numbers $n$ such that $5^{n}+12^{n}$ is perfect square.


## Solution

By checking the cases $n=1,2,3$ we get the solution $n=2$ and $13^{2}=5^{2}+12^{2}$.

If $n=2 k+1$ is odd, we consider the equation modulo 5 and we obtain

$$
\begin{aligned}
x^{2} & \equiv 5^{2 k+1}+12^{2 k+1}(\bmod 5) \equiv 2^{2 k} \cdot 2(\bmod 5) \\
& \equiv(-1)^{k} \cdot 2(\bmod 5) \equiv \pm 2(\bmod 5)
\end{aligned}
$$

This is not possible, because the square residue of any natural number module 5 is 0,1 or 4. Therefore $n$ is even and $x^{2}=5^{2 k}+12^{2 k}$. Rearrange this equation in the form

$$
5^{2 k}=\left(x-12^{k}\right)\left(x+12^{k}\right)
$$

If 5 divides both factors on the right, it must also divide their difference, that is

$$
5 \mid\left(x+12^{k}\right)-\left(x-12^{k}\right)=2 \cdot 12^{k}
$$

which is not possible. Therefore we must have

$$
x-12^{k}=1 \text { and } x+12^{k}=5^{2 k}
$$

By adding the above equalities we get

$$
5^{2 k}-1=2 \cdot 12^{k}
$$

For $k \geq 2$, we have the inequality

$$
25^{k}-1>24^{k}=2^{k} \cdot 12^{k}>2 \cdot 12^{k}
$$

Thus we conclude that there exists a unique solution to our problem, namely $n=2$.
