Determine the set of natural numbers $n$ such that $5^{n}+4$ is a square.
We are therefore looking for the $n$ such that the equation

$$
5^{n}+4=a^{2}
$$

This can be rewritten as

$$
5^{n}=a^{2}-4
$$

By recognizing a notable identity, this is equivalent to

$$
(a-2)(a+2)=5^{n}
$$

Consequently, since 5 is prime, we deduce that $a-2$ and $a+2$ are powers of 5, i.e., there exist integers $r$ and $s$ such that

$$
\begin{aligned}
& a+2=5^{r} \\
& a-2=5^{s}
\end{aligned}
$$

Their difference is therefore, assuming without loss of generality that $r \geq s$,

$$
\begin{aligned}
(a+2)-(a-2)=4 & =5^{r}-5^{s} \\
& =5^{s}\left(5^{r-s}-1\right)
\end{aligned}
$$

The only possibility is therefore $s=0$ and $r-s=1$.

We deduce that if $n$ is a solution, then $5^{n}+4=9$.

We verify that $5^{2}+4=9$.

Consequently, there is a unique solution which is

![](https://cdn.mathpix.com/cropped/2024_05_10_10c029b6c4865f8b8ca3g-153.jpg?height=69&width=137&top_left_y=1736&top_left_x=965)