%I #17 Feb 10 2020 18:23:21
%S 1,-1,0,0,-1,0,1,0,0,1,-1,0,1,-1,0,0,-1,0,1,0,0,1,-1,0,0,-1,0,0,-1,0,
%T 1,0,0,1,-1,0,1,-1,0,0,-1,0,1,0,0,1,-1,0,0,0,0,0,-1,0,1,0,0,1,-1,0,1,
%U -1,0,0,-1,0,1,0,0,1,-1,0,1,-1,0,0,-1,0,1,0,0
%N Moebius function mu(n) defined for the Eisenstein integers.
%C Just like the original Moebius function over the integers, a(n) = 0 if n has a squared Eisenstein prime factor, otherwise (-1)^t if n is a product of an Eisenstein unit and t distinct Eisenstein prime factors.
%C Let w = (1 + sqrt(3)*i)/2, w' = (1 - sqrt(3)*i)/2. a(n) = 0 for n divisible by 3 since 3 = w'*(1 + w)^2 contains a squared factor. For rational primes p == 1 (mod 3), p is always factored as (x + y*w)(x + y*w'), x + y*w and x + y*w' are not associated so a(p) = (-1)*(-1) = 1.
%H Jianing Song, <a href="/A319448/b319448.txt">Table of n, a(n) for n = 1..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Eisenstein_integer">Eisenstein integer</a>
%F a(n) = 0 if n is divisible by 3 or has a square prime factor, otherwise Product_{p divides n} (3 - 2*(p mod 3)) where the product is taken over the primes.
%F Multiplicative with a(p^e) = 0 if p = 3 or e > 1, a(p) = 1 if p == 1 (mod 3) and -1 if p == 2 (mod 3).
%F For squarefree n, a(n) = Legendre symbol (n, 3) = Kronecker symbol (-3, n) = A102283(n).
%e Let w = (1 + sqrt(3)*i)/2, w' = (1 - sqrt(3)*i)/2.
%e a(14) = -1 because 14 is factored as 2*(2 + w)*(2 + w') with three distinct Eisenstein prime factors.
%e a(55) = (-1)*(-1) = 1 because 55 = 5*11 where 5 and 11 are congruent to 2 mod 3 (thus being Eisenstein primes).
%t f[p_, e_] := If[p == 3 || e > 1, 0, Switch[Mod[p, 3], 1, 1, 2, -1]]; eisMu[1] = 1; eisMu[n_] := Times @@ f @@@ FactorInteger[n]; Array[eisMu, 100] (* _Amiram Eldar_, Feb 10 2020 *)
%o (PARI)
%o a(n)=
%o {
%o my(r=1, f=factor(n));
%o for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
%o if(p==3||e>=2, r=0);
%o if(Mod(p, 3)==2&e==1, r*=-1);
%o );
%o return(r);
%o }
%Y Cf. A102283.
%Y 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), A319445 ("phi", A000010), A319446 ("psi", A002322), A319443 ("omega", A001221), A319444 ("Omega", A001222), this sequence ("mu", A008683).
%Y Equivalent in the ring of Gaussian integers: A318608.
%K sign,mult
%O 1,1
%A _Jianing Song_, Sep 19 2018