Proposition (primes in integers and Gaussian integers)
Let $p$ be a prime in $\Z$.
The following are equivalent:
-
$p$ is not a prime in $\Z[i]$;
-
$p$ is a sum of two squares, i.e. $p=a^2 + b^2$ for some $a,b\in \Z$;
-
$p\equiv 1$ or $p\equiv 2\pmod 4$.
Proof