## Task A-2.3.

Determine all ordered triples $(m, n, p)$ where $m$ and $n$ are natural numbers, and $p$ is a prime number, for which the following holds:

$$
25^{n}+2 \cdot 5^{n}=p^{m}+8
$$
## Solution.

The only solution to the equation is $(m, n, p)=(3,1,3)$.

By adding 1 to both sides of the equation and applying the difference of squares, we get

$$
\begin{aligned}
\left(5^{n}+1\right)^{2} & =p^{m}+9 & & 1 \text{ point} \\
\left(5^{n}-2\right)\left(5^{n}+4\right) & =p^{m} . & & 1 \text{ point}
\end{aligned}
$$

Both factors on the left side of the equation are natural numbers greater than 1, so for their product to equal a power of a prime number, both must be powers of that prime.

Thus, there exist natural numbers $a$ and $b$ such that $5^{n}-2=p^{a}$ and $5^{n}+4=p^{b}$, and $a+b=m$. Since the second factor is greater than the first, we conclude that $b>a$.

By subtracting the obtained equations, we get

$$
6=\left(5^{n}+4\right)-\left(5^{n}-2\right)=p^{b}-p^{a}=p^{a}\left(p^{b-a}-1\right)
$$

Since the prime factors of 6 are 2 and 3, we have two cases: $p=2$ and $p=3$.

If $p=2$, the initial equation has no solution because the expression $25^{n}$ is odd, while all other expressions are even.

If $p=3$, then $p^{a}=3$ and $p^{b-a}-1=2$, so $a=1$ and $b=2$. We conclude that $m=3$, and from $5^{n}-2=3$ we get $n=1$.