%I #37 Feb 10 2020 06:14:47
%S 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,
%T 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,
%U 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
%N Moebius function mu(n) defined for the Gaussian integers.
%C Just like the original Moebius function over the integers, a(n) = 0 if n has a squared Gaussian prime factor, otherwise (-1)^t if n is a product of a Gaussian unit and t distinct Gaussian prime factors.
%C a(n) = 0 for even n since 2 = -i*(1 + i)^2 contains a squared factor. For rational primes p == 1 (mod 4), p is always factored as (x + y*i)(x - y*i), x + y*i and x - y*i are not associated so a(p) = (-1)*(-1) = 1.
%C Interestingly, a(n) and A091069(n) have the same absolute value (= |A087003(n)|), since the discriminants of the quadratic fields Q[i] and Q[sqrt(2)] are -4 and 8 respectively, resulting in Q[i] and Q[sqrt(2)] being two of the three quadratic fields with discriminant a power of 2 or negated (the other one being Q[sqrt(-2)] with discriminant -8).
%H Jianing Song, <a href="/A318608/b318608.txt">Table of n, a(n) for n = 1..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Gaussian_integer">Gaussian integer</a>
%F 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.
%F 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).
%F a(n) = 0 if A078458(n) != A086275(n), otherwise (-1)^A086275(n).
%F a(n) = A103226(n,0) = A103226(0,n).
%F For squarefree n, a(n) = Kronecker symbol (-4, n) = A101455(n). Also for these n, a(n) = A091069(n) if n even or n == 1 (mod 8), otherwise -A091069(n).
%e a(15) = -1 because 15 is factored as 3*(2 + i)*(2 - i) with three distinct Gaussian prime factors.
%e a(21) = (-1)*(-1) = 1 because 21 = 3*7 where 3 and 7 are congruent to 3 mod 4 (thus being Gaussian primes).
%t 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 *)
%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==2||e>=2, r=0);
%o if(Mod(p,4)==3&e==1, r*=-1);
%o );
%o return(r);
%o }
%Y Absolute values are the same as those of A087003.
%Y First row and column of A103226.
%Y Cf. A008683 (original Moebius function over the integers), A091069 (Moebius function over Z[sqrt(2)]).
%Y Cf. A101455.
%Y 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).
%K sign,easy,mult
%O 1,1
%A _Jianing Song_, Aug 30 2018
|