How to solve $p^n+12^2=m^2$ Find all triples $(m,n,p) \in \mathbb{N}^3$, with $p$ prime, which satisfy $$p^n+12^2=m^2$$

I have rewritten it as
$$ p^n = (m+12)(m-12) $$
Then there exists $\ 0 \le a \le n\ $ such that $\ p^a=m-12$. It follows that 
$ p^n = p^a (p^a+24) $ and then $$ p^a(p^{n-2a}-1)= 24 = 2^3 \cdot 3 $$
We have the following cases:


*

*$\; p^a=1$ and then $a=0$ and $p^n=25$, which yields $p=5$, $n=2$ and $m=13$

*$\; p^a=2^3$ and then $p=2$, $a=3$, $n=8$ and $m=20$

*$\; p^a=3$ and then $p=3$, $a=1$, $n=4$ and $m=15$


So, all the solutions are $(13,2,5)$, $(20,8,2)$ and $(15,4,3)$.
