TITLE: Prime Numbers And Perfect Squares
QUESTION [12 upvotes]: Find all primes $p$ and $q$ such that $p^2 + 7pq + q^2$ is a perfect square.
One obvious solution is $p = q$ and under such a situation all primes $p$ and $q$ will satisfy.
Further if $p \neq q$ then we can assume without the loss of generality that $p > q$. Assuming this and that there exists at least one such perfect square I have tried to show some contradiction modulo $4$ as any odd perfect square leaves a remainder of $1$ when divided by $4$, but it is not working. However I firmly believe that $p = q$ is the only solution, but I have failed to prove this.

REPLY [2 votes]: COMMENT.- Just for fun, prove easily the impossibility for twin numbers and other couples of primes.
First, not possible for $p=2\lt q$. In fact $$q^2+14q+4=z^2\Rightarrow z^2\ge55\Rightarrow z\ge 8$$ Actually $\color{red}{z\ge 9}$ because $z$ must be odd. The discriminant of $q^2+14q+4-z^2=0$ is $ 45+z^2=t^2$ so making $t=z+h$ one has $45=2zh+h^2\ge18h+h^2$. It is clear how to finish.
$$***$$
 Now with the twin numbers $(p,q)=(p,p+2)$  where $p\ge3$. One has
$$p^2+7p(p+2)+(p+2)^2=9p^2+18p+4=z^2$$ 
Because of $p\ge3$ we have $z\ge 12$ so $\color{red}{z\ge 13}$ because $z$ should be odd.
The equation in $3p$
$$(3p)^2+6(3p)+4-z^2=0$$ has discriminant $$9-4+z^2=t^2\iff5+z^2=t^2$$ This is impossible because $z$ being greater or equal than $13$   the minimal difference  $t^2-z^2$ must be greater or equal than $ 14^2-13^2=27.$
$$***$$
There are much primes of the form $(p,q)=(p,p+4)$, for example $(3,7),(7,11),(13,17)$,…… For these we have $$p^2+7p(p+4)+(p+4)^2=z^2=9p^2+36p+16=z^2\Rightarrow z^2\ge 205\Rightarrow \color{red}{z\ge 15}$$ The equation 
$$(3p)^2+12(3p)+16-z^2=0$$ has discriminant $36-16+z^2=t^2\iff 20=t^2-z^2$ but then we have $20\ge 16^2-15^2=31$, absurde.
Wants someone to try to see the case $(p,q)=(p+2h)\large ?$ This includes all the odd primes.