<s>[INST] How can $p^{q+1}+q^{p+1}$ be a perfect square? How can one find all primes $(p,q)$  such that $p^{q+1}+q^{p+1}$ is a perfect square 
I considered it $\mod 2$ and found a trival solution .
Im curious about an eventual answer Diophantine equations are extremely hard.
This seems harder than IMO Q2 of this year .
edit1:
I think one should consider it $\mod 4$ . 
 [/INST] Claim: $(p,q)=(2,2)$ is the only pair of prime solutions.
Proof. 
Consider $$ p^{q+1} + q^{p+1} = n^2.$$
With $(p,q)=(2,3),(3,2)$ the LHS equals $43$, a prime number itself.
With $(p,q)=(3,3)$ it equals $2\cdot3^4$, which obviously is not a square as the exponent of $2$ is odd.
With one equal to $2$ and the other $\ge29$, say respectively $p$ and $q$, it is not a square because $$\left(2^{\frac{q+1}{2}}\right)^2<2^{q+1}+q^3<2^{q+1}+2^{\frac{q+3}{2}}+1=\left(2^{\frac{q+1}{2}}+1\right)^2;$$
one can rule out $5\le q < 29$ by trial and error.
Suppose there exist solutions with $p,q\ge5$. They are respectively equal to $6a\pm1$ and $6b\pm1$, for some positive integers $a,b$, so substituting for each of the four cases we have $$\begin{align}(6a+1)^{6b+2}+(6b+1)^{6a+2}&=n^2 \\ \left((6a+1)^{3b+1}\right)^{2}+\left((6b+1)^{3a+1}\right)^{2}&=n^2 \tag{1}\end{align}$$ or $$ \begin{align}(6a-1)^{6b+2}+(6b+1)^{6a}&=n^2 \\ \left((6a-1)^{3b+1}\right)^{2}+\left((6b+1)^{3a}\right)^{2}&=n^2 \tag{2}\end{align}$$ or  $$\begin{align} (6a+1)^{6b}+(6b-1)^{6a+2}&=n^2 \\ \left((6a+1)^{3b}\right)^{2}+\left((6b-1)^{3a+1}\right)^{2}&=n^2 \tag{3}\end{align}$$ or $$\begin{align}(6a-1)^{6b}+(6b-1)^{6a}&=n^2 \\ \left((6a-1)^{3b}\right)^{2}+\left((6b-1)^{3a}\right)^{2}&=n^2. \tag{4}\end{align}$$
All of them are pithagorean identities, and as such, one and only one of the numbers squared in their LHS is odd. But each one of them is a power of an odd number, hence an odd number itself. Thus we have a contradiction, and the claim is proved. $ \ \ \ \ \ \ \ \ \ \ \  \text{QED}$
</s>