OFFSET
1,2
COMMENTS
These are the primes in the ring of integers a+bi, a and b rational integers, i = sqrt(-1).
Two primes are considered equivalent if they differ by multiplication by a unit (+-1, +-i).
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, A16.
L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. V.
EXAMPLE
There are 8 Gaussian primes of norm 5, +-1+-2i and +-2+-i, but only two inequivalent ones (2+-i).
MATHEMATICA
norms = Union[ #*Conjugate[#]& [ Select[ Flatten[ Table[a + b*I, {a, 0, 31}, {b, 0, 31}]], PrimeQ[#, GaussianIntegers -> True] &]]]; f[norm_] := (Clear[a, b]; primes = {a + b*I} /. {ToRules[ Reduce[a^2 + b^2 == norm, {a, b}, Integers]]}; primes //. {p1___, p2_, p3___, p4_, p5___} /; MatchQ[p2, (-p4 | I*p4 | -I*p4)] :> {p1, p2, p3, p5} // Length); A055027 = f /@ norms (* Jean-François Alcover, Nov 30 2012 *)
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, Jun 09 2000
EXTENSIONS
More terms from Reiner Martin, Jul 20 2001
STATUS
approved