OFFSET
1,2
COMMENTS
Equivalent of phi (A000010) in the ring of Eisenstein integers.
Number of units in the ring Z[w]/nZ[w], where Z[w] is the ring of Eisenstein integers.
a(n) is the number of elements in G(n) = {a + b*w: a, b in Z/nZ and gcd(a^2 + a*b + b^2, n) = 1} where w = (1 + sqrt(3)*i)/2.
a(n) is the number of ordered pairs (a, b) modulo n such that gcd(a^2 + a*b + b^2, n) = 1.
For n > 2, a(n) is divisible by 6.
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
Wikipedia, Eisenstein integer
FORMULA
Multiplicative with a(3^e) = 2*3^(2*e-1), a(p^e) = phi(p^e)^2 = (p-1)^2*p^(2*e-2) if p == 1 (mod 3) and J_2(p^e) = A007434(p^e) = (p^2 - 1)*p^(2*e-2) if p == 2 (mod 3).
Sum_{k=1..n} a(k) ~ c * n^3, where c = (8/27) * Product_{p prime == 1 (mod 3)} (1 - 2/p^2 + 1/p^3) * Product_{p prime == 2 (mod 3)} (1 - 1/p^3) = 0.2410535987... . - Amiram Eldar, Feb 13 2024
EXAMPLE
Let w = (1 + sqrt(3)*i)/2, w' = (1 - sqrt(3)*i)/2.
{1, w, w'} is the set of 3 units in the Eisenstein integers modulo 2, so a(2) = 3.
{1, w, w^2, -1, w', w'^2} is the set of 6 units in the Eisenstein integers modulo 3, so a(3) = 6.
{1, w, w'} is the set of 3 units in the Eisenstein integers modulo 2, so a(2) = 3.
{1, w, 1 + w, w', 1 + w', -1 + 2w, -1, -w, -1 - w, -w', -1 - w', -1 + 2w'} is the set of 12 units in the Eisenstein integers modulo 4, so a(4) = 12.
MATHEMATICA
f[p_, e_] := If[p == 3 , 2*3^(2*e - 1), Switch[Mod[p, 3], 1, (p - 1)^2*p^(2*e - 2), 2, (p^2 - 1)*p^(2*e - 2)]]; eisPhi[1] = 1; eisPhi[n_] := Times @@ f @@@ FactorInteger[n]; Array[eisPhi, 100] (* Amiram Eldar, Feb 10 2020 *)
PROG
(PARI)
a(n)=
{
my(r=1, f=factor(n));
for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
if(p==3, r*=2*3^(2*e-1));
if(p%3==1, r*=(p-1)^2*p^(2*e-2));
if(p%3==2, r*=(p^2-1)*p^(2*e-2));
);
return(r);
}
CROSSREFS
Cf. A007434.
Equivalent of arithmetic functions in the ring of Eisenstein integers (the corresponding functions in the ring of integers are in the parentheses): A319442 ("d", A000005), A319449 ("sigma", A000203), this sequence ("phi", A000010), A319446 ("psi", A002322), A319443 ("omega", A001221), A319444 ("Omega", A001222), A319448 ("mu", A008683).
Equivalent in the ring of Gaussian integers: A079458.
KEYWORD
nonn,mult
AUTHOR
Jianing Song, Sep 19 2018
STATUS
approved