gives the Möbius function .
- MoebiusMu is also known as Möbius function.
- Integer mathematical function, suitable for both symbolic and numerical manipulation.
- MoebiusMu[n] gives the sum of the primitive roots of unity.
- For a number n=u p1k1⋯ pmkm with u a unit and pi primes, MoebiusMu[n]returns 0 unless all ki are equal to 1, in which case it gives (-1)m.
- MoebiusMu[m+In] automatically works over Gaussian integers.
Examplesopen allclose all
Basic Examples (2)
Plot the MoebiusMu sequence for the first 20 numbers:
Numerical Manipulation (4)
Basic Applications (2)
Histogram of the cumulative values of MoebiusMu:
Number Theory (9)
Use MoebiusMu to test for a square-free number:
Use MoebiusMu to compute the number of terms in the Farey sequence:
MoebiusMu satisfies the following identities:
Plot the Mertens function [more info]:
Properties & Relations (7)
MoebiusMu is a multiplicative function:
MoebiusMu is 0 for composite prime powers and for primes:
MoebiusMu is 0 for non-square-free integers:
MoebiusMu is equal to the sum of the primitive roots of unity: