When does a prime $p=m^2+n^2$ divide the term $ m^3+n^3-4$? I came across a math olympiad type question that goes like this:
For what primes $p$ will $p=m^2+n^2$ and $p$ divide $m^3+n^3-4$?
I tried a few examples and think that $p=5$ is the only solution but am unable to prove it. The property that $p \equiv 1 \mod 4$ seems to not be helpful so far. Any clues or solutions are welcome.

Sorry for waking up old post...
Anyway, I think the following works.
Since $p\mid m(m^2+n^2)$ and $p\mid n(m^2+n^2)$ we have $p|3(m^3+m^2n+n^2m+n^3)$ Since \begin{align}3(m^3+m^2n+n^2m+n^3)&=(m+n)^3+2(m^3+n^3)\\&=(m+n)^3+8+ 2(m^3+n^3-4)\end{align}
we obtain $p|(m+n)^3+8$，while $$(m+n)^3+8=(m+n+2)(m^2+n^2+2mn-2m-2n+4)$$
Since $p$ is prime, it divides one of the factors.
The case $p|(m+n+2)$ is easily dealt and gives $p=2,5$.
The latter case reduces to $p|2(mn-m-n+2)$, and to $p|(mn-m-n+2)$ if $p\neq 2$.
Now $m^2+n^2\leq mn-m-n+2$, but $m^2+n^2\geq 2|mn|$, so some simple comparison gives the only possibility $m=-2,n=-3,p=13$.
Hence the answer $p=2,5,13$.
