A318608 Moebius function mu(n) defined for the Gaussian integers.
1, 0, -1, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0
Offset: 1
Examples
a(15) = -1 because 15 is factored as 3*(2 + i)*(2 - i) with three distinct Gaussian prime factors. a(21) = (-1)*(-1) = 1 because 21 = 3*7 where 3 and 7 are congruent to 3 mod 4 (thus being Gaussian primes).
Links
- Jianing Song, Table of n, a(n) for n = 1..10000
- Wikipedia, Gaussian integer
Crossrefs
Absolute values are the same as those of A087003.
First row and column of A103226.
Cf. A101455.
Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): A062327 ("d", A000005), A317797 ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), A086275 ("omega", A001221), A078458 ("Omega", A001222), this sequence ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319448.
Cf. A091069 (Moebius function over Z[sqrt(2)]).
Programs
-
Mathematica
f[p_, e_] := If[p == 2 || e > 1, 0, Switch[Mod[p, 4], 1, 1, 3, -1]]; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 10 2020 *)
-
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==2||e>=2, r=0); if(Mod(p,4)==3&e==1, r*=-1); ); return(r); }
Formula
a(n) = 0 if n even or has a square prime factor, otherwise Product_{p divides n} (2 - (p mod 4)) where the product is taken over the primes.
Multiplicative with a(p^e) = 0 if p = 2 or e > 1, a(p) = 1 if p == 1 (mod 4) and -1 if p == 3 (mod 4).
Comments