Möbius Function Calculator
Compute μ(n) with full prime factorization, squarefree verdict, and parity of distinct prime factors.
Calculator
Möbius Function Inputs
Möbius Summary
Results
μ(n)
-1
Möbius value: −1, 0, or +1
Yes
Whether any squared prime divides n
3
Count of distinct prime factors
2 × 3 × 5
Prime-power decomposition
1
Product of p^(even part of exponent)
μ(n) by complete trial-division factorization; squarefree verdict and (−1)^k parity shown with every step.
Visualizations
Prime exponents
μ across 1..n (sampled)
Distinct primes vs total size
Square part vs n
Formula
The Möbius function is zero on non-squarefree integers and records the parity of the distinct-prime count otherwise.
Alternative Form
Variables
| Symbol | Name | Unit | Description |
|---|---|---|---|
| n | Input | integer | Positive integer 1–10,000,000 |
| k = ω(n) | Distinct primes | count | Number of distinct prime factors |
| μ(n) | Result | −1 / 0 / +1 | 0 if squareful, else (−1)^k |
| p² | n | Square divisor | integer | Any squared prime dividing n forces μ = 0 |
Explanation
Factor first, scan exponents for repeats, then read parity: even k gives +1, odd k gives −1.
Derivation
For squarefree n = p₁…pₖ, μ(n) = (−1)^k by definition; if any p²|n the value is 0. Summatory identity Σ_{d|n} μ(d) = [n=1] underpins Möbius inversion.
Step-by-Step Calculation
Follow each step to understand how the result is calculated from your inputs.
Read the input.
Factor n by trial division up to √n.
Test every exponent for a square.
Count distinct primes k.
Apply the Möbius rule.
Verify by direct check.
Worked Examples
See how the calculator works with different scenarios.
Scenario
Three distinct primes.
Inputs
Calculation
30 = 2×3×5, k=3 odd → μ = −1
Result
μ(30) = −1
Interpretation
Odd distinct-prime count gives −1.
Understanding Your Result
Your Result: μ(n) — see the result card (−1, 0, or +1 with the squarefree verdict).
Typical range: Only −1, 0, +1. About 60.8% of integers (6/π²) are squarefree, so ±1 slightly outnumber zeros.
What This Means
Zero means a squared prime divides n; ±1 records whether the distinct-prime count is even (+1) or odd (−1).
Why It Matters
μ powers Möbius inversion, totient identities, and prime-distribution analysis via the Mertens function.
Professional Interpretation
A zero flags repeated factors (bad for squarefree-dependent theorems); ±1 confirms a clean squarefree input for inversion formulas.
Recommendations
- •Quote factorization with μ
- •Check squarefree before inversion
- •Use k parity to sanity-check sign
- •Cap trial division at 10⁷
- •Sum μ for Mertens estimates
Educational Content
Introduction
The Möbius function compresses the whole factorization of n into a single −1, 0, or +1 with deep analytic meaning.
Concept Explanation
Squareful inputs collapse to 0; squarefree inputs reduce to the parity (−1)^k of their distinct-prime count.
Applications
Benefits
- •Instant μ with proof trace
- •Squarefree verdict included
- •Full factorization shown
- •Parity reasoning visible
- •Inversion identity cross-check
Limitations
- •Trial division to 10⁷
- •Single value, not summatory
- •No Pollard-rho for giants
Best Practices
- •State n with its factorization
- •Name the squared prime when μ=0
- •Quote k when μ=±1
- •Verify Σ_{d|n} μ(d)
- •Respect the input cap
Common Misconceptions
Practical Tips
- •Factor fully before judging μ
- •Any exponent ≥ 2 means μ = 0 at once
- •Even k → +1, odd k → −1
- •Remember μ(1) = +1
- •Name the squared prime in reports
- •Cross-check with Σ_{d|n} μ(d)
- •Stay at n ≤ 10,000,000 here
Common Mistakes
Assumptions
This calculator makes the following assumptions to provide estimates:
Limitations
Be aware of these limitations when using this calculator:
Frequently Asked Questions
Answers to common questions about this calculator.
What is the Möbius function?
What is μ(30)?
Why is μ(12) = 0?
What does squarefree mean?
What is μ used for?
What is the Mertens function?
Is μ(1) = 1 or 0?
Why the 10,000,000 cap?
μ = 1 vs −1 — which is "good"?
Can μ be anything besides −1, 0, 1?
Related Calculators
Explore more calculators related to this topic.
Related Guides
Deepen your understanding with these educational resources.
Glossary
Technical terms used in mortgage calculations explained in plain language.
- Möbius function μ
- −1/0/+1 encoding squarefreeness and prime-count parity.
- Squarefree
- No squared prime divides n.
- Distinct-prime count ω(n)
- k = number of different primes dividing n.
- Möbius inversion
- Recovering f from its divisor sums via μ weights.
- Mertens function
- M(x) = cumulative μ sum; linked to the Riemann hypothesis.
- Trial division
- Factoring by testing divisors up to √n.
- Dirichlet convolution
- Divisor-sum product where μ is the inverse of 1.
- 6/π² density
- Asymptotic share (~60.8%) of squarefree integers.
Authoritative References
Trusted sources and standards referenced by this calculator.
Applicable Standards
Was This Calculator Helpful?
Page Information
2026-09-29
2.0.0
Free to use for educational and professional purposes.