Möbius Function Calculator
Calculate the Mobius function for any positive integer, returning -1, 0 or +1 with full prime factorization, squarefree analysis, a step-by-step explanation, the Mertens function and a colour-coded heatmap of 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 upgrading for ad-free browsing and more daily uses, or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade for ad-free browsing and higher daily limits
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.
Basic Math Operations:
- Absolute Value Calculator New
- Amicable Number Checker New
- Carry and Borrow Visualizer New
- Ceiling and Floor Function Calculator New
- Common Factor Calculator
- Cross Multiplication Calculator New
- Cube and Cube Root Calculator
- Cube Root Calculator
- Digital Root Calculator New
- Divide Into Two Parts
- Divisibility Test Calculator
- Egyptian Multiplication Calculator New
- Estimation Calculator Popular
- Even or Odd Number Checker New
- Factor Calculator
- Fibonacci Number Checker New
- Find Minimum and Maximum
- First n Digits of e
- First n Digits of Pi Popular
- Goldbach Conjecture Verifier New
- Greatest Common Factor Calculator
- Is it a Prime Number? Popular
- Least Common Multiple Calculator
- Long Addition and Subtraction Calculator New
- Long Division Calculator Popular
- Long Multiplication Calculator Popular
- Möbius Function Calculator New
- Mental Math Trainer New
- Mersenne Prime Checker New
- Modulo Calculator Popular
- Multiplication Calculator Popular
- Multiplication Table Generator New
- n-th Root Calculator
- Number Bonds Generator New
- Number of Digits Calculator Popular
- Number Pattern Finder Popular
- Order of Operations Calculator (PEMDAS) Popular
- Perfect Number Checker New
- Place Value Chart Generator New
- Prime Factor Calculator
- Prime Factorization Calculator
- Quotient and Remainder Calculator Popular
- Random Math Problem Generator Popular
- Ratio Calculator Popular
- Roman Numeral Math Solver New
- Russian Peasant Multiplication New
- Skip Counting Generator New
- Soroban Abacus Simulator New
- Sort Numbers Popular
- Square Root (√) Calculator Popular
- Sum Calculator Popular
- Times Tables Quiz New
- Unit Rate Calculator New
- Vedic Math Tricks Calculator New