This site is supported by donations to The OEIS Foundation.

# Gaussian primes

A Gaussian prime is a non-unit Gaussian integer $m+ni\,$ divisible only by its associates and by the units ($1,\,i,\,-1,\,-i\,$ ), and by no other Gaussian integers.

The Gaussian primes fall into one of three categories:

1. Gaussian integers with imaginary part zero and a prime real part $m\,$ with $|m|\,$ a real prime satisfying $|m|\,\equiv \,3{\bmod {4}}\,$ (numbers of A002145 multiplied by $1\,$ or $-1\,$ ).
2. Gaussian integers with real part zero and an imaginary part $n\,$ with $|n|\,$ a real prime satisfying $|n|\,\equiv \,3{\bmod {4}}\,$ (numbers of A002145 multiplied by $i\,$ or $-i\,$ ).
3. Gaussian integers having both real and imaginary parts, and its complex norm is a real prime number in $\mathbb {Z} \,$ . (For example, given the numbers listed in A069003, the numbers $n\pm a(n)i\,$ are Gaussian primes.)

For example, neither 2 nor 5 are Gaussian primes, but since $2^{2}+5^{2}=29$ , which is a prime in $\mathbb {Z} \,$ , then $2+5i$ is a Gaussian prime, divisible only by itself (or its associates $-2-5i$ , $5-2i$ , $-5+2i$ ) and 1 (or its associates $-1$ , $i$ and $-i$ ) but no other Gaussian integers.

It should be noted that although all Gaussian primes in category 1 above are in A000040, 2 and all primes congruent to 1 mod 4 (Pythagorean primes) are Gaussian composites, since they are the sum of two squares, with factorization in $\mathbb {C} \,$ given by $a^{2}+b^{2}\,=\,(a-bi)(a+bi)\,$ .