TITLE: Find all primes $p,q$ such that $p^q + q^p$ is perfect square
QUESTION [6 upvotes]: Just a hint for a solution? I tried to separate the cases when one of the primes is $2$, so it would be $2^p + p^2 = k^2$ for some $k$. Since $2^p$ is even, and $p^2$ is odd, it implies that $k^2$ is odd and therefore must be in form $4k+1$... but don't know what to do next.

REPLY [8 votes]: For the case you are investigating, we have $k-p$ and $k+p$ are both powers of $2$, say $2^a$ and $2^b$. That gives $p=\frac{2^b-2^a}{2}$. Not many possibilities for $a$!