Mobius Function Calculator
Calculate the Mobius function μ(n), a fundamental function in number theory used in the Mobius inversion formula.
Enter n (1 to 1,000,000,000) to calculate μ(n)
The Mobius function μ(n) is a multiplicative function in number theory defined for positive integers. It plays a central role in the Mobius inversion formula, which allows you to invert certain types of sums over divisors.
Definition:
- μ(1) = 1
- μ(n) = (-1)^k if n is a product of k distinct primes (squarefree)
- μ(n) = 0 if n has a squared prime factor
Examples: μ(1) = 1, μ(2) = -1, μ(3) = -1, μ(4) = 0 (since 4 = 2²), μ(5) = -1, μ(6) = 1 (since 6 = 2 × 3 has 2 prime factors), μ(30) = -1 (since 30 = 2 × 3 × 5 has 3 prime factors).
Key Property: The sum of μ(d) over all divisors d of n equals 1 if n = 1, and 0 otherwise. This is written as Σ μ(d) = [n = 1] where the sum is over all d dividing n.
Mobius Inversion Formula: If g(n) = Σ f(d) summed over divisors d of n, then f(n) = Σ μ(d) · g(n/d). This powerful formula is used throughout analytic number theory.
Applications: The Mobius function appears in the inclusion-exclusion principle, the Euler totient function formula φ(n) = n · Σ μ(d)/d, prime counting functions, and cryptographic algorithms.
What is the Mobius function used for?
The Mobius function is fundamental in number theory, primarily used in the Mobius inversion formula to 'invert' sums over divisors. It appears in formulas for Euler's totient function, the inclusion-exclusion principle, and is crucial in analytic number theory for studying prime distributions.
What does it mean when the Mobius function equals zero?
When the Mobius function equals zero, it means the number has a squared prime factor (is not squarefree). For example, 12 = 2^2 * 3 has 2 squared, so mu(12) = 0. This indicates the number is divisible by a perfect square greater than 1.
How is the Mobius function related to prime numbers?
The Mobius function is intimately connected to primes. For any prime p, mu(p) = -1. For a product of k distinct primes, mu(n) = (-1)^k. The Mobius function essentially encodes information about a number's prime factorization structure.
What is the Mobius inversion formula?
The Mobius inversion formula states: if g(n) = sum of f(d) over all divisors d of n, then f(n) = sum of mu(d) * g(n/d) over all divisors d of n. This powerful tool allows recovering an original function from its divisor sum, with applications throughout number theory.