# Find all Gaussian primes in a given range

All $a,b \in \mathbb{Z}$ so that $0\le a \le 4, 1 \le b \le 4$ and $\pi = a+bi$ prime in $\mathbb{Z}[i]$ want to be found.

All the possibilities over $\mathbb{Z}[i]$ are : $(i),(1+i),(2+i),(3+i),(4+i),(2i),(3i),(4i),(1+2i),(1+3i),(1+4i),(2+2i)$ ,$(2+3i),(2+4i),(3+2i)),(3+3i),(3+4i),(4+2i),(4+3i),(4+4i)$

seems to be wrongâ€¦.

Does somebody see the right way of solving this? Please tell !

-
It is unclear what you are asking. The sentence "Every prime in a field..." makes no sense. Do you mean something to the effect that "prime and irreducible are equivalent for principal ideal domains"? Fields have no prime or irreducible elements -- all non-zero elements are units which are by definition not prime or irreducible –  Bill Cook Nov 9 '11 at 15:46
$a+bi$ is a Guassian prime if and only if $a^2+b^2$ is a prime or $a^2+b^2=p^2$ where $p\equiv 3\pmod 4$ and $p$ is prime. –  Thomas Andrews Nov 9 '11 at 15:49
There are only $20$ pairs to examine. Each is quickly handled. –  André Nicolas Nov 9 '11 at 16:38
What do you mean with to "examine" ?? –  VVV Nov 9 '11 at 16:55
List them all, with Y if prime, N if not. Here is a start. Let $a=0$. We have $i$ (N, unit), $2i$ (N, factorable), $3i$ (Y, use criterion of Thomas Andrews, non-trivial factor would need to have norm $3$), $4i$ (N). Justify in each case, unless it is obvious. Next comes $a=1$. We have $1+i$ (Y, norm is prime); $1+2i$ (Y, norm is prime); $1+3i$ (N, find a non-trivial factor, or use criterion of Thomas Andrews). Continue. There is a lot to be learned from doing concrete calculations. –  André Nicolas Nov 9 '11 at 17:23