## Task A-3.3.

Determine all ordered pairs $(m, n)$ of natural numbers for which there exists a prime number $p$ such that

$$
9^{m}+3^{m}-2=2 p^{n}
$$
## First Solution.

By factoring the left side, we get

$$
\left(3^{m}-1\right)\left(3^{m}+2\right)=2 p^{n}
$$

If both factors on the left side of the equation were divisible by $p$, then their difference

$$
3^{m}+2-\left(3^{m}-1\right)=3
$$

would also be divisible by $p$, meaning $p=3$.

However, the left side of the equation is not divisible by 3, so this is not possible.

We conclude that $p$ does not divide $3^{m}-1$, meaning $3^{m}-1=1$ or $3^{m}-1=2$.

The first factor is an even number, so it must be $3^{m}-1=2$ and $3^{m}+2=p^{n}$.

From the first equation, we have $m=1$, and substituting into the second equation gives $p=5$ and $n=1$.