%I #11 Jun 17 2017 10:20:13
%S 0,0,0,1,1,0,0,2,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,2,0,0,
%T 0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,2,
%U 0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,2,0
%N Number of inequivalent Eisenstein-Jacobi primes of norm n.
%C These are the primes in the ring of integers a+b*omega, a and b rational integers, omega = (1+sqrt(-3))/2.
%C Two primes are considered equivalent if they differ by multiplication by a unit (+-1, +-omega, +-omega^2).
%D R. K. Guy, Unsolved Problems in Number Theory, A16.
%D L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. VI.
%F a(n) = 2 if n is a prime = 1 (mod 6); a(n) = 1 if n = 3 or n = p^2 where p is a prime = 2 (mod 3); a(n) = 0 otherwise. - _Franklin T. Adams-Watters_, May 05 2006
%e There are 6 Eisenstein-Jacobi primes of norm 3, omega-omega^2 times one of the 6 units [ +-1, +-omega, +-omega^2 ] but only one up to equivalence.
%t a[3] = 1; a[p_ /; PrimeQ[p] && Mod[p, 6] == 1] = 2; a[n_ /; PrimeQ[p = Sqrt[n]] && Mod[p, 3] == 2] = 1; a[_] = 0; Table[a[n], {n, 0, 104}] (* _Jean-François Alcover_, Aug 19 2013, after Franklin T. Adams-Watters *)
%t Table[Which[PrimeQ[n]&&Mod[n,6]==1,2,n==3,1,PrimeQ[Sqrt[n]]&&Mod[ Sqrt[ n],3] == 2,1,True,0],{n,0,110}] (* _Harvey P. Dale_, Jun 17 2017 *)
%Y Cf. A055664-A055667, A055025-A055029. See A004016 and A035019 for theta series of Eisenstein (or hexagonal) lattice.
%K nonn,easy,nice
%O 0,8
%A _N. J. A. Sloane_, Jun 09 2000
%E More terms from _Franklin T. Adams-Watters_, May 05 2006