Find the prime numbers $p<q<r$ such that $r^2-q^2-p^2$ is a perfect square.
I think the only solution is (2,3,7) but i cannot prove it. The equation would be $r^2-q^2-p^2=k^2$ equivalently $q^2+p^2+k^2=r^2$ which is somehow a classical diophantine equation (of the pythagorean quadruples) which have a parametrization but how do i use it? The problem is from a magazine at 8 th grade and i don't think the solution is supposed to use the general solution.
Actually the general solution of $q^2+p^2+k^2=r^2$ is given by: $ q=a^2+b^2-c^2-d^2$
$r=a^2+b^2+c^2+d^2$ IT would follow that one of the numbers q or p is even and prime, so it is 2.