MoebiusMu( n )
MoebiusMu computes the value of the Moebius function
for the integer n. This is 0 for integers which are not squarefree,
i.e., which are divisible by a square r^2. Otherwise it is 1 if
n has an even number and -1 if n has an odd number of
prime factors.
The importance of mu stems from the so called inversion formula. Suppose f(n) is a function defined on the positive integers and let g(n)=sum_(d midn)(f(d)). Then f(n)=sum_(d midn)(mu(d) g(n/d)). As a special case we have phi(n) = sum_(d midn)(mu(d) n/d) since n = sum_(d midn)(phi(d)) (see Phi).
MoebiusMu usually spends all of its time factoring n
(see FactorsInt).
gap> MoebiusMu( 60 );
0
gap> MoebiusMu( 61 );
-1
gap> MoebiusMu( 62 );
1