Möbius Function Calculator
Calculate the Möbius function μ(n) for any positive integer. Instantly returns −1, 0, or +1 with full prime factorization, squarefree analysis, step-by-step explanation, Mertens function M(n), and a color-coded μ-value heatmap showing nearby integers.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Möbius Function Calculator
The Möbius Function Calculator computes \( \mu(n) \) for any positive integer n up to 1013. Enter a number and instantly see its μ-value (−1, 0, or +1), full prime factorization, squarefree badge, the Mertens function \( M(n) = \sum_{k=1}^{n}\mu(k) \), a color-coded heatmap of μ-values for nearby integers, and a complete step-by-step explanation. It is designed for number theory students, competitive math learners, and anyone exploring squarefree integers, Möbius inversion, or the Riemann zeta connection.
What Is the Möbius Function?
The Möbius function, denoted \( \mu(n) \), is defined on positive integers by:
$$\mu(n) = \begin{cases} +1 & \text{if } n = 1 \\ +1 & \text{if } n \text{ is squarefree with an even number of prime factors} \\ -1 & \text{if } n \text{ is squarefree with an odd number of prime factors} \\ \phantom{+}0 & \text{if } n \text{ has a squared prime factor (} p^2 \mid n \text{ for some prime } p\text{)} \end{cases}$$Introduced by the German mathematician August Ferdinand Möbius in 1832, this deceptively simple function is one of the most important tools in analytic and multiplicative number theory. It is multiplicative: \( \mu(mn) = \mu(m)\mu(n) \) whenever \( \gcd(m, n) = 1 \).
The Three Cases at a Glance
Values of μ(n) for Small n
| n | Factorization | μ(n) | Why |
|---|---|---|---|
| 1 | 1 | +1 | Base case (empty product) |
| 2 | 2 | −1 | 1 prime · squarefree |
| 3 | 3 | −1 | 1 prime · squarefree |
| 4 | 2² | 0 | Divisible by 2² |
| 5 | 5 | −1 | 1 prime · squarefree |
| 6 | 2·3 | +1 | 2 primes · squarefree |
| 7 | 7 | −1 | 1 prime · squarefree |
| 8 | 2³ | 0 | Divisible by 2² |
| 9 | 3² | 0 | Divisible by 3² |
| 10 | 2·5 | +1 | 2 primes · squarefree |
| 12 | 2²·3 | 0 | Divisible by 2² |
| 30 | 2·3·5 | −1 | 3 primes · squarefree |
| 210 | 2·3·5·7 | +1 | 4 primes · squarefree |
| 2310 | 2·3·5·7·11 | −1 | 5 primes · squarefree |
Key Identities and Theorems
| Name | Formula | Significance |
|---|---|---|
| Divisor-sum identity | \( \sum_{d \mid n} \mu(d) = [n = 1] \) | μ is the Dirichlet inverse of the constant 1 |
| Möbius inversion | \( g(n) = \sum_{d \mid n} f(d) \iff f(n) = \sum_{d \mid n} \mu(d)\,g(n/d) \) | Recovers f from its divisor sum g |
| Euler's totient link | \( \varphi(n) = \sum_{d \mid n} \mu(d)\,\frac{n}{d} \) | Expresses φ via μ |
| Riemann zeta | \( \dfrac{1}{\zeta(s)} = \sum_{n=1}^{\infty} \dfrac{\mu(n)}{n^{s}} \) | Links μ directly to the zeta function |
| Mertens function | \( M(n) = \sum_{k=1}^{n} \mu(k) \) | Its growth rate is equivalent to RH |
| Squarefree density | \( \lim_{n \to \infty} \dfrac{Q(n)}{n} = \dfrac{6}{\pi^2} \) | Q(n) counts squarefree ≤ n |
How to Use the Möbius Function Calculator
- Enter a positive integer n into the input field. Values up to \(10^{13}\) are supported. Digits only — commas or spaces are automatically stripped.
- Click "Calculate μ(n)" (or pick a quick example). The tool runs trial-division factorization and determines μ in milliseconds.
- Read the hero card to see μ(n) as −1, 0, or +1 with a squarefree badge and the count of distinct primes ω(n).
- Study the prime factorization chips — each prime becomes a pill-shaped chip; red-bordered chips with a "!" marker indicate a squared factor (why μ = 0).
- Scan the μ heatmap of integers near n. Green cells are +1, purple cells are −1, gray cells are 0. Click any cell to recompute for that integer.
- Review the step-by-step solution showing the factorization, squarefree check, prime count, and the final application of \( \mu(n) = (-1)^k \).
Applications of the Möbius Function
Beyond pure number theory, μ(n) appears in combinatorics (cyclotomic polynomials, necklace counting, Lyndon words), cryptography (primitive root tests, some primality heuristics), physics (partition functions and the Witten zeta function), and computer science (inclusion-exclusion on divisor lattices, fast Möbius transform). Every time you need to "undo" a divisor sum or enforce squarefree constraints, μ is the key.
FAQ
Reference this content, page, or tool as:
"Möbius Function Calculator" at https://MiniWebtool.com/m-bius-function-calculator/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-04-18
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.
Related MiniWebtools:
Basic Math Operations:
- Common Factor Calculator
- Cube and Cube Root Calculator
- Cube Root Calculator
- Divide Into Two Parts
- Divisibility Test Calculator
- Factor Calculator
- Find Minimum and Maximum
- First n Digits of e
- First n Digits of Pi Featured
- Greatest Common Factor Calculator
- Is it a Prime Number?
- Least Common Multiple Calculator
- Modulo Calculator Featured
- Multiplication Calculator
- n-th Root Calculator
- Number of Digits Calculator Featured
- Prime Factor Calculator
- Prime Factorization Calculator
- Quotient and Remainder Calculator Featured
- Sort Numbers Featured
- Square Root (√) Calculator Featured
- Sum Calculator Featured
- Ratio Calculator New
- Long Division Calculator New
- Cross Multiplication Calculator New
- Multiplication Table Generator New
- Long Multiplication Calculator New
- Long Addition and Subtraction Calculator New
- Order of Operations Calculator (PEMDAS) New
- Place Value Chart Generator New
- Number Pattern Finder New
- Even or Odd Number Checker New
- Absolute Value Calculator New
- Ceiling and Floor Function Calculator New
- Unit Rate Calculator New
- Skip Counting Generator New
- Estimation Calculator New
- Perfect Number Checker New
- Amicable Number Checker New
- Mersenne Prime Checker New
- Goldbach Conjecture Verifier New
- Möbius Function Calculator New
- Fibonacci Number Checker New
- Digital Root Calculator New