The question is pretty self-explanatory.I was wondering how this equation could be solved using "number theory".
2 Answers
Partial solution Note that $$p^3=p^2+q^2+r^2$$ implies that one of the numbers is equal to $3$, because if all of them are coprime with $3$ then $\mp1\equiv 1+1+1\mod 3$ which is absurd.
The case $p=3$ is easy,
The two remaining cases are symmetric , wa can assume that WLOG that $q=3$ then: $p^3-p^2=9+r^2$

- 13,725
-
The final equation is equivalent to $$(p-3)(p^2+p+3)=(p-r)(p+r)$$ or $$(p-3)(p^2+2p+6)=(r-3)(r+3)$$ if it helps someone – Elaqqad Apr 12 '15 at 17:03
-
1IMO there's no need to post a partial answer only 12 minutes after the question is asked. If it remains unanswered for a day or so, then you can post a partial answer but surely at the time you wrote this you hadn't thought deeply about it yet. See meta. – Bart Michels Apr 13 '15 at 08:10
The only deep result we need is the fact that primes congruent to $3$ mod $4$ remain primes as Gaussian integers.
To begin, it's easy to show that there are no solutions if $2$ is used as one (or more) of the primes; in particular, $8=4+q^2+r^2$ and $p^3=p^2+4+4$ have no solutions. So $p$, $q$, and $r$ are all odd. This implies
$$p\equiv p^3=p^2+q^2+r^2\equiv1+1+1=3\mod4$$
But writing the equation now as
$$p^3-p^2=q^2+r^2$$
implies $p\mid q\pm ir$ since $p$ is prime as a Gaussian integer, so we have $p\mid q$ and $p\mid r$, which is to say (since $q$ and $r$ are also primes), $p=q=r$. It quickly follows that $p^3=3p^2$ implies $p=q=r=3$ is the only solution.
Strictly speaking it's not necessary to invoke Gaussian integers; it suffices to know that $-1$ is not a quadratic residue mod $p$ if $p\equiv3$ mod $4$.

- 79,832
$$ p \mid p^3 \Rightarrow p \mid q^2, , , p \mid r^2 \Rightarrow p=q=r $$
Furthermore, $p=q=r=3$ solves your equation.
– Kevin Sheng Apr 12 '15 at 16:41