2. Determine all values of $m, n, p$ such that $p^{n}+144=m^{2}$, where $m$ and $n$ are positive integers and $p$ is a prime number.
Solution: The possible values of $(m, n, p)$ are $(13,2,5),(20,8,2)$ and $(15,4,3)$.

Rewrite the equation in the form $p^{n}=m^{2}-144=(m+12)(m-12)$. Since the only divisors of $p^{n}$ are powers of $p$, the equation is equivalent to the system

$$
\left\{\begin{array}{l}
m+12=p^{a} \\
m-12=p^{b}
\end{array}\right.
$$

where $a$ and $b$ are natural numbers such that $a>b \geq 0$ and $a+b=n$. Subtracting the second equation from the first, we get

$$
24=p^{b}\left(p^{a-b}-1\right) .
$$

If $b=0$, the last equation becomes $24=p^{a}-1$, from which the solution $p=5, n=$ $2, m=13$ is immediately obtained.

If instead $b>0$, since $p^{b}$ divides $24=2^{3} \cdot 3$, then $p=2$ or $p=3$. Moreover, since $p$ does not divide $p^{a-b}-1, p^{b}=8$ or $p^{b}=3$. Substituting, the other two solutions $p=2, n=8, m=20$ and $p=3, n=4, m=15$ are found.