Four, (50 points) Find all prime numbers $p$, such that there exist integers $m, n$, satisfying: $p=m^{2}+n^{2}, p \mid m^{3}+n^{3}-4$.


When $p=2$, take $m=n=1$. When $p \geqslant 3$, let $m+n=s, mn=t$, then $p=s^{2}-2t$, and $s^{3}-3ts-4 \equiv 0(\bmod p)$, hence $2s^{3}-6ts-8 \equiv 0(\bmod p) \Rightarrow s^{3}+8 \equiv 0(\bmod p)$ $\Leftrightarrow(s+2)\left(s^{2}-2s+4\right) \equiv 0(\bmod p)$. If $s+2 \equiv 0(\bmod p), \because-\sqrt{2p}<s<\sqrt{2p}$, $\therefore s=-2$ or $p-2$, and when $s=p-2$, $p \leqslant 5$.

When $s=-2$, $p \equiv 4-2t \equiv 0(\bmod 2)$, a contradiction. Therefore, $s=p-2, p=5$,
take $m=1, n=2$, which satisfies the condition.
If $s+2 \neq 0(\bmod p)$, then $p \mid s^{2}-2s+4$.
When $p=13$, take $m=-2, n=-3$, which satisfies the condition.
When $p \geqslant 17$, $3 \leqslant s^{2}-2s+4<(\sqrt{2p})^{2}+2\sqrt{2p}+4<3p$,
$\therefore s^{2}-2s+4=p$ or $2p$, and since $s$ is odd, $s^{2}-2s+4=p$,

Also, $s^{2}-2t=p$, thus $t=s-2$, $\Rightarrow(m-1)(n-1)=$ -3.
From this, we find $p=8$ or 16, neither of which satisfies the condition.
In summary, the required $p$ are $2, 5, 13$.