OFFSET
1,2
COMMENTS
Two prime Eisenstein integers are not counted separately if they are associated, i.e., if their quotient is a unit (1, -w^2, w, -1, w^2 or -w).
LINKS
Eric Weisstein's World of Mathematics, Eisenstein prime
Wikipedia, Eisenstein integer.
EXAMPLE
a(7)=15 because the Eisenstein primes whose modulus <= 7 are 1-w^2, 1-2w^2, 1-3w^2, 1-5w^2, 1-6w^2, 2, 2-w^2, 2-3w^2, 3-w^2, 3-2w^2, 3-4w^2, 4-3w^2, 5, 5-w^2, 6-w^2.
MATHEMATICA
a[n_] := Module[{w2=-1/2-I*Sqrt[3]/2, lst={}, x, y, z, Nz}, Do[z=x-w2*y; Nz=x^2+x*y+y^2; If[y==0&&Mod[Sqrt[Nz], 3]==2&&Sqrt[Nz]<=n&&PrimeQ[Sqrt[Nz]], AppendTo[lst, {x, y}], If[Mod[Nz, 3]!=2&&Sqrt[Nz]<=n&&PrimeQ[Nz], AppendTo[lst, {x, y}]]], {x, 0, n}, {y, 0, n}]; Length@lst]; Array[a, 100]
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank M Jackson and Michael B Rees, Mar 05 2018
STATUS
approved