Wikipedia
Möbius function
View on Wikipedia
This article includes a list of general references, but it lacks sufficient corresponding inline citations. (October 2024) |
The Möbius function is a multiplicative function in number theory introduced by the German mathematician August Ferdinand Möbius (also transliterated Moebius) in 1832.[i][ii][2] It is ubiquitous in elementary and analytic number theory and most often appears as part of its namesake the Möbius inversion formula. Following work of Gian-Carlo Rota in the 1960s, generalizations of the Möbius function were introduced into combinatorics, and are similarly denoted .
Key Information
Definition
[edit]The Möbius function is defined by[3]
The Möbius function can alternatively be represented as
where is the Kronecker delta, is the Liouville function, is the number of distinct prime divisors of , and is the number of prime factors of , counted with multiplicity.
Another characterization by Carl Friedrich Gauss is the sum of all primitive roots.[4]
Values
[edit]The values of for the first 50 positive numbers are
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | −1 | −1 | 0 | −1 | 1 | −1 | 0 | 0 | 1 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | |
|---|---|---|---|---|---|---|---|---|---|---|
| −1 | 0 | −1 | 1 | 1 | 0 | −1 | 0 | −1 | 0 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | −1 | 0 | 0 | 1 | 0 | 0 | −1 | −1 |
| 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | |
|---|---|---|---|---|---|---|---|---|---|---|
| −1 | 0 | 1 | 1 | 1 | 0 | −1 | 1 | 1 | 0 |
| 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | |
|---|---|---|---|---|---|---|---|---|---|---|
| −1 | −1 | −1 | 0 | 0 | 1 | −1 | 0 | 0 | 0 |
The first 50 values of the function are plotted below:

Larger values can be checked in:
Applications
[edit]Mathematical series
[edit]The Dirichlet series that generates the Möbius function is the (multiplicative) inverse of the Riemann zeta function; if is a complex number with real part larger than 1 we have
This may be seen from its Euler product
Also:
- where is Euler's constant.
The Lambert series for the Möbius function is
which converges for . For prime , we also have
Algebraic number theory
[edit]Gauss[1] proved that for a prime number the sum of its primitive roots is congruent to .
If denotes the finite field of order (where is necessarily a prime power), then the number of monic irreducible polynomials of degree over is given by[5]
The Möbius function is used in the Möbius inversion formula.
Physics
[edit]The Möbius function also arises in the primon gas or free Riemann gas model of supersymmetry. In this theory, the fundamental particles or "primons" have energies . Under second quantization, multiparticle excitations are considered; these are given by for any natural number . This follows from the fact that the factorization of the natural numbers into primes is unique.
In the free Riemann gas, any natural number can occur, if the primons are taken as bosons. If they are taken as fermions, then the Pauli exclusion principle excludes squares. The operator that distinguishes fermions and bosons is then none other than the Möbius function .
The free Riemann gas has a number of other interesting connections to number theory, including the fact that the partition function is the Riemann zeta function. This idea underlies Alain Connes's attempted proof of the Riemann hypothesis.[6]
Properties
[edit]The Möbius function is multiplicative (i.e., whenever and are coprime).
Proof: Given two coprime numbers , we induct on . If , then . Otherwise, , so
The sum of the Möbius function over all positive divisors of (including itself and 1) is zero except when :
The equality above leads to the important Möbius inversion formula and is the main reason why is of relevance in the theory of multiplicative and arithmetic functions.
Other applications of in combinatorics are connected with the use of the Pólya enumeration theorem in combinatorial groups and combinatorial enumerations.
There is a formula[7] for calculating the Möbius function without directly knowing the factorization of its argument:
i.e. is the sum of the primitive -th roots of unity. (However, the computational complexity of this definition is at least the same as that of the Euler product definition.)
Other identities satisfied by the Möbius function include
and
- .
The first of these is a classical result while the second was published in 2020.[8][9] Similar identities hold for the Mertens function.
Proof of the formula for the sum of over divisors
[edit]The formula
can be written using Dirichlet convolution as: where is the identity under the convolution.
One way of proving this formula is by noting that the Dirichlet convolution of two multiplicative functions is again multiplicative. Thus it suffices to prove the formula for powers of primes. Indeed, for any prime and for any
- ,
while for
- .
Other proofs
[edit]Another way of proving this formula is by using the identity
The formula above is then a consequence of the fact that the th roots of unity sum to 0, since each th root of unity is a primitive th root of unity for exactly one divisor of .
However it is also possible to prove this identity from first principles. First note that it is trivially true when . Suppose then that . Then there is a bijection between the factors of for which and the subsets of the set of all prime factors of . The asserted result follows from the fact that every non-empty finite set has an equal number of odd- and even-cardinality subsets.
This last fact can be shown easily by induction on the cardinality of a non-empty finite set . First, if , there is exactly one odd-cardinality subset of , namely itself, and exactly one even-cardinality subset, namely . Next, if , then divide the subsets of into two subclasses depending on whether they contain or not some fixed element in . There is an obvious bijection between these two subclasses, pairing those subsets that have the same complement relative to the subset . Also, one of these two subclasses consists of all the subsets of the set , and therefore, by the induction hypothesis, has an equal number of odd- and even-cardinality subsets. These subsets in turn correspond bijectively to the even- and odd-cardinality -containing subsets of . The inductive step follows directly from these two bijections.
A related result is that the binomial coefficients exhibit alternating entries of odd and even power which sum symmetrically.
Average order
[edit]The mean value (in the sense of average orders) of the Möbius function is zero. This statement is, in fact, equivalent to the prime number theorem.[10]
sections
[edit]if and only if is divisible by the square of a prime. The first numbers with this property are
- 4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, 54, 56, 60, 63, ... (sequence A013929 in the OEIS).
If is prime, then , but the converse is not true. The first non prime for which is . The first such numbers with three distinct prime factors (sphenic numbers) are
- 30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 222, ... (sequence A007304 in the OEIS).
and the first such numbers with 5 distinct prime factors are
Mertens function
[edit]In number theory another arithmetic function closely related to the Möbius function is the Mertens function, defined by
for every natural number n. This function is closely linked with the positions of zeroes of the Riemann zeta function. See the article on the Mertens conjecture for more information about the connection between and the Riemann hypothesis.
From the formula
it follows that the Mertens function is given by
where is the Farey sequence of order .
This formula is used in the proof of the Franel–Landau theorem.[11]
Generalizations
[edit]Incidence algebras
[edit]In combinatorics, every locally finite partially ordered set (poset) is assigned an incidence algebra. One distinguished member of this algebra is that poset's "Möbius function". The classical Möbius function treated in this article is essentially equal to the Möbius function of the set of all positive integers partially ordered by divisibility. See the article on incidence algebras for the precise definition and several examples of these general Möbius functions.
Popovici's function
[edit]Constantin Popovici[12] defined a generalised Möbius function to be the -fold Dirichlet convolution of the Möbius function with itself. It is thus again a multiplicative function with
where the binomial coefficient is taken to be zero if . The definition may be extended to complex by reading the binomial as a polynomial in .[13]
Implementations
[edit]- Mathematica
- Maxima
- geeksforgeeks C++, Python3, Java, C#, PHP, JavaScript
- Rosetta Code
- Sage
See also
[edit]Notes
[edit]- ^ Hardy & Wright, Notes on ch. XVI: "... occurs implicitly in the works of Euler as early as 1748, but Möbius, in 1832, was the first to investigate its properties systematically". (Hardy & Wright 1980, Notes on ch. XVI)
- ^ In the Disquisitiones Arithmeticae (1801) Carl Friedrich Gauss showed that the sum of the primitive roots () is , (see #Properties and applications) but he didn't make further use of the function. In particular, he didn't use Möbius inversion in the Disquisitiones.[1] The Disquisitiones Arithmeticae has been translated from Latin into English and German. The German edition includes all of his papers on number theory: all the proofs of quadratic reciprocity, the determination of the sign of the Gauss sum, the investigations into biquadratic reciprocity, and unpublished notes.
Citations
[edit]- ^ a b Gauss 1986, Art. 81.
- ^ Möbius 1832, pp. 105–123.
- ^ Abramowitz & Stegun 1972, p. 826.
- ^ Weisstein, Eric W. "Möbius Function". mathworld.wolfram.com. Retrieved 1 October 2024.
- ^ Jacobson 2009, §4.13.
- ^ Bost & Connes 1995, pp. 411–457.
- ^ Hardy & Wright 1980, (16.6.4), p. 239.
- ^ Apostol 1976.
- ^ Kline 2020.
- ^ Apostol 1976, §3.9.
- ^ Edwards 1974, Ch. 12.2.
- ^ Popovici 1963, pp. 493–499.
- ^ Sándor & Crstici 2004, p. 107.
Sources
[edit]- Abramowitz, Milton; Stegun, Irene A. (1972) [1964]. Handbook of mathematical functions: with formulas, graphs and mathematical tables [conference under the auspices of the National science foundation and the Massachusetts institute of technology]. Dover books on advanced mathematics. New York: Dover. ISBN 978-0-486-61272-0.
- Apostol, Tom M. (1976). Introduction to analytic number theory. Undergraduate Texts in Mathematics. New York; Heidelberg: Springer-Verlag. ISBN 978-0-387-90163-3. MR 0434929. Zbl 0335.10001.
- Bost, J.-B.; Connes, Alain (1995). "Hecke Algebras, Type III factors and phase transitions with spontaneous symmetry breaking in number theory". Selecta Mathematica. New Series. 1 (3): 411–457. doi:10.1007/BF01589495. S2CID 116418599.
- Deléglise, Marc; Rivat, Joël (1996). "Computing the summation of the Möbius function". Experimental Mathematics. 5 (4): 291–295. doi:10.1080/10586458.1996.10504594. S2CID 574146.
- Edwards, Harold (1974). Riemann's Zeta Function. Mineola, New York: Dover Publications. ISBN 0-486-41740-9.
- Gauss, Carl Friedrich (1965). Untersuchungen uber hohere Arithmetik (Disquisitiones Arithemeticae & other papers on number theory). Translated by Maser, H. (2nd ed.). New York: Chelsea. ISBN 0-8284-0191-8.
- Gauss, Carl Friedrich (1986). Disquisitiones Arithemeticae. Translated by Clarke, Arthur A. (corrected 2nd ed.). New York: Springer. ISBN 0-387-96254-9.
- Hardy, G. H.; Wright, E. M. (1980) [First edition published 1938]. An Introduction to the Theory of Numbers (5th ed.). Oxford: Oxford University Press. ISBN 978-0-19-853171-5 – via Internet Archive.
- Kline, Jeffery (2020). "Unital Sums of the Möbius and Mertens Functions" (PDF). Journal of Integer Sequences. 23 (8): 1–17.
- Jacobson, Nathan (2009) [First published 1985]. Basic algebra I (2nd ed.). Dover Publications. ISBN 978-0-486-47189-1.
- Klimov, N. I. (2001) [1994], "Möbius function", Encyclopedia of Mathematics, EMS Press
- Möbius, A. F. (1832). "Über eine besondere Art von Umkehrung der Reihen". Journal für die reine und angewandte Mathematik. 9: 105–123.
- Pegg, Ed Jr (2003), "The Möbius function (and squarefree numbers)", Ed Pegg's Math Games
- Popovici, Constantin P. (1963). "A generalization of the Möbius function". Studii şi Cercetări Matematice. 14: 493–499. MR 0181602.
- Sándor, Jozsef; Crstici, Borislav (2004). Handbook of number theory II. Dordrecht: Kluwer Academic. ISBN 1-4020-2546-7. Zbl 1079.11001.
- Sándor, József; Mitrinović, Dragoslav S.; Crstici, Borislav, eds. (2006). Handbook of number theory I. Dordrecht: Springer-Verlag. pp. 187–226. ISBN 1-4020-4215-9. Zbl 1151.11300.
External links
[edit]Grokipedia
Möbius function
View on GrokipediaDefinition
Mathematical Definition
The Möbius function, denoted , is an arithmetic function defined on the positive integers . A positive integer is said to be square-free if it is not divisible by any perfect square greater than 1, meaning in its prime factorization, no prime appears with exponent greater than 1. The function takes the value 1 if is square-free and has an even number of distinct prime factors, -1 if is square-free and has an odd number of distinct prime factors, and 0 otherwise.[1] The number of distinct prime factors of is denoted by the prime omega function . More explicitly, if the prime factorization of is where the are distinct primes and each , then if any , and otherwise , where .[1] This definition implies that is completely determined by the prime factorization of , and since 1 has no prime factors.[5] The Möbius function was introduced by August Ferdinand Möbius in his 1832 paper "Über eine besondere Art von Umkehrung der Reihen" (On a special type of series inversion), published in the Journal für die reine und angewandte Mathematik, volume 9, pages 105–123, where it arose as coefficients in the inversion of certain power series expansions.[6][7] Its application in number theory, particularly through connections to divisor sums and Dirichlet convolution, was developed and popularized by mathematicians such as Peter Gustav Lejeune Dirichlet and Richard Dedekind in the mid-19th century.[6]Relation to Divisors
The Möbius function arises in number theory as a tool for inverting sums over divisors of an integer . Specifically, if two arithmetic functions and satisfy for all positive integers , then the Möbius inversion formula states that .[4] This formula, introduced by August Ferdinand Möbius in 1832, provides a systematic way to recover from .[4] In the context of Dirichlet convolution, the relation can be interpreted as follows: the constant function for all convolves with any arithmetic function to yield the sum-of-divisors function . The Möbius function serves as the Dirichlet convolution inverse of , meaning that , where is the unit function with and for . Thus, acts as the coefficients that "undo" the summation over divisors.[8] A prominent application of this inversion appears in the recovery of Euler's totient function , which counts the number of positive integers up to that are coprime to . It is a known identity that for all . To derive the inverted form, apply the Möbius inversion formula with and , yielding . The steps are: start from ; substitute for the role of in the general formula, where the divisors align such that the sum over of directly inverts the original sum; this holds because the convolution inverse ensures the equality.[9] The Möbius function also connects to the Riemann zeta function through Dirichlet series. For , the Dirichlet series equals , where is the zeta function. This follows from expanding the Euler product and matching coefficients with the definition of , which is zero for non-squarefree and alternates in sign based on the number of distinct prime factors.[8]Values and Examples
Tabular Values for Small n
The Möbius function μ(n) takes values in {-1, 0, 1}, determined by the prime factorization of n: it is 1 if n has an even number of distinct prime factors (square-free), -1 if an odd number (square-free), and 0 if n has a repeated prime factor.[10] To illustrate these values concretely, the following table lists μ(n) for n from 1 to 30, along with a brief note on the prime factorization used for computation.[10]| n | Prime factorization | μ(n) |
|---|---|---|
| 1 | (empty product) | 1 |
| 2 | 2 | -1 |
| 3 | 3 | -1 |
| 4 | 2² | 0 |
| 5 | 5 | -1 |
| 6 | 2 × 3 | 1 |
| 7 | 7 | -1 |
| 8 | 2³ | 0 |
| 9 | 3² | 0 |
| 10 | 2 × 5 | 1 |
| 11 | 11 | -1 |
| 12 | 2² × 3 | 0 |
| 13 | 13 | -1 |
| 14 | 2 × 7 | 1 |
| 15 | 3 × 5 | 1 |
| 16 | 2⁴ | 0 |
| 17 | 17 | -1 |
| 18 | 2 × 3² | 0 |
| 19 | 19 | -1 |
| 20 | 2² × 5 | 0 |
| 21 | 3 × 7 | 1 |
| 22 | 2 × 11 | 1 |
| 23 | 23 | -1 |
| 24 | 2³ × 3 | 0 |
| 25 | 5² | 0 |
| 26 | 2 × 13 | 1 |
| 27 | 3³ | 0 |
| 28 | 2² × 7 | 0 |
| 29 | 29 | -1 |
| 30 | 2 × 3 × 5 | -1 |
Patterns in Prime Powers
The Möbius function displays a clear pattern when restricted to prime powers. For any prime $ p $ and positive integer exponent $ k $, $ \mu(p^k) = -1 $ if $ k = 1 $, and $ \mu(p^k) = 0 $ if $ k \geq 2 $.[1] This behavior arises because higher powers introduce repeated prime factors, causing the function to vanish. The following table lists these values for the first five primes:| Prime $ p $ | $ \mu(p) $ | $ \mu(p^2) $ | $ \mu(p^3) $ |
|---|---|---|---|
| 2 | -1 | 0 | 0 |
| 3 | -1 | 0 | 0 |
| 5 | -1 | 0 | 0 |
| 7 | -1 | 0 | 0 |
| 11 | -1 | 0 | 0 |
Core Properties
Multiplicativity
The Möbius function is a multiplicative arithmetic function, meaning that if , then .[2] To prove this property, consider the prime factorizations of and . Since , they share no common prime factors. Recall that if has a squared prime factor, if , if is square-free with distinct prime factors, and if . If either or has a squared prime factor, then or , so ; moreover, also has that squared factor, so . If both and are square-free with and distinct primes respectively, then is square-free with distinct primes, yielding . Thus, multiplicativity holds in all cases.[2] This multiplicativity implies that is not completely multiplicative, as the property fails when . For example, take for a prime : , but .[2] A key consequence of multiplicativity is the Euler product representation of the associated Dirichlet series. For ,Inversion Formula
The Möbius inversion formula provides a method to recover an arithmetic function from its divisor sum , where for all positive integers . In this case, . This relation holds for any arithmetic functions and , and it is a cornerstone of analytic number theory for inverting sums over divisors.[12] The proof relies on the multiplicativity of the Möbius function , which allows the relation to be established first for prime powers and then extended generally. Consider the case where for a prime and integer . Here, , and the inversion gives . Since , , and for , this simplifies to (with for the base case ). Substituting the expression for yields , confirming the formula holds for prime powers.[13] For the general case, substitute the definition of into the proposed inversion:Sum Over Divisors
The sum of the Möbius function over the divisors of a positive integer is given by the identityAnalytic Properties
Average Order
The average order of the Möbius function is characterized by the asymptotic behavior of its partial sums, known as the Mertens function . Specifically, the normalized sum tends to 0 as . This result is equivalent to the prime number theorem, which asserts that the number of primes up to is asymptotically .[17] A proof of this asymptotic follows from the Dirichlet series representation for , where is the Riemann zeta function. Since has no zeros in this half-plane and a simple pole at , standard analytic methods such as the Wiener-Ikehara theorem or Perron's formula imply that . An explicit unconditional bound is given by Mertens' theorem, which states that for some constant . This was originally established in the late 19th century and refined over time. The equivalence to the prime number theorem and the initial rigorous proof of were established by Hans von Mangoldt in 1895, building on Riemann's ideas about the zeta function. Under the Riemann hypothesis, the error term improves significantly to . As of 2024, the best explicit unconditional bounds include for , obtained via comparisons with sums over zeta zeros. More refined subexponential bounds, such as for large , have also been derived.[18]Distribution of μ(n)
The Möbius function takes the value 0 precisely when is not square-free, and the asymptotic density of square-free positive integers up to is , so the proportion of with is .[19] Among the square-free integers, the values and occur with equal frequency, each with asymptotic density .[19] Since if is square-free and 0 otherwise, the second moment satisfies .[19] This reflects the density of square-free numbers and provides a quantitative measure of the support of . Under the Riemann Hypothesis, sums of the Möbius function in short intervals of length with follow a normal distribution with mean 0 and variance , indicating pseudorandom behavior.[20] The Chowla conjecture further asserts that correlations of the Möbius function vanish, meaning that for any fixed distinct shifts , the average as .[21] As of 2023, Matomäki and Radziwiłł, in joint work with others, established that the logarithmic average of in short intervals aligns asymptotically with its global density , extending uniformity results for bounded multiplicative functions.[22]Mertens Function
The Mertens function, denoted , is the summatory function of the Möbius function , defined for real byApplications
In Number-Theoretic Sums
The Möbius function plays a central role in the Dirichlet convolution of arithmetic functions, defined as . Specifically, the convolution of the Möbius function with the constant function for all yields the Dirichlet unit function , where and for , satisfying .[27] This property establishes as the Dirichlet inverse of the constant function , forming the basis for inverting convolutions in number-theoretic sums.[28] This inversion capability enables the recovery of arithmetic functions from their convolutions with . For instance, if , then Möbius inversion gives . A classic application arises with the Euler totient function , which counts the integers up to coprime to . The identity follows directly from , where is the identity function, allowing the sum to be inverted to express explicitly.[29] In evaluating sums over arithmetic progressions or divisor structures, partial sums involving often appear. For example, the partial sum converges asymptotically to as , reflecting the behavior of the Dirichlet series near , where the limit yields .[30] A representative application is counting square-free integers, which are positive integers not divisible by any perfect square other than . The indicator function for square-freeness is , since if and only if is square-free. The number of square-free integers up to is thus , where is the natural density of square-free integers derived from the Euler product over primes.[31] In sieve theory, the Möbius function provides weights for inclusion-exclusion principles to estimate the distribution of primes or prime-like sequences. Brun's sieve, introduced by Viggo Brun in 1915, modifies the full inclusion-exclusion via by truncating the sum to a finite level, balancing exactness with computational feasibility. This truncation replaces the unrestricted (where is a product of small primes) with a weighted sum over restricted divisors, yielding upper and lower bounds for sifted sets, such as twin primes, with error terms controlled by sieve dimensions.[32]In Algebraic Number Theory
In algebraic number theory, the Möbius function extends naturally to the multiplicative semigroup of nonzero ideals in the ring of integers of a number field , where is a Dedekind domain. The ideal Möbius function is defined by if has a repeated prime ideal factor, if is a product of distinct prime ideals, and . This definition preserves multiplicativity, and the fundamental property holds: for any nonzero ideal , , where is the Iverson bracket (1 if true, 0 otherwise). This relation enables Möbius inversion in the poset of ideals ordered by divisibility, analogous to the integer case.[33] The Dedekind zeta function (for , where the sum is over nonzero ideals and the product over prime ideals) has reciprocal , mirroring the Riemann zeta function's Euler product inversion. This generalization plays a crucial role in analytic properties of number fields. Dirichlet -functions over , defined as for a Dirichlet character , satisfy when is principal (reducing to the zeta case) or more generally via the twisted Möbius function . The Artin conjecture asserts that Artin -functions associated to irreducible representations of the Galois group of a Galois extension coincide with finite products of such Dirichlet -functions (or Hecke -functions in the number field setting), thereby linking the Möbius inversion to the analytic continuation and functional equations of these -functions.[34] A key application arises in the class number formula for quadratic fields . For imaginary quadratic fields (), the class number is given by , where is the discriminant, is the number of roots of unity in , and is the Kronecker symbol character; the real quadratic case adjusts the constant accordingly. Here, , so the Euler product for incorporates the prime factorization structure, with entering via the reciprocal's Dirichlet series expansion, which aids in residue computations and analytic class number bounds. In ray class groups, the Möbius function appears in Stickelberger's theorem and its generalizations: for the ray class group modulo in cyclotomic extensions, the Stickelberger annihilator ideal, generated by elements involving Gauss sums , acts on the group, and degree formulas like involve Möbius inversion over divisors of the conductor via the ideal Euler totient , adjusted by unit group indices such as .[34][35][36]In Physics
In quantum field theory, the Möbius function μ(n) finds an interpretation as the fermion number operator (-1)^F, which distinguishes bosonic and fermionic states in supersymmetric theories. This equivalence allows the derivation of the classical Möbius inversion formula from physical principles, such as the Witten index—a topological invariant that counts the difference between bosonic and fermionic ground states—and leads to number-theoretic results like an analogue of the prime number theorem through sums involving μ(n).[37] The function also appears in the algebraic structure underlying multiple zeta values (MZVs), which evaluate Feynman integrals in perturbative quantum field theory. Specifically, μ(n) enters the Möbius transformation used to count irreducible MZVs of given weight and depth, facilitating reductions and relations among these periods that arise in scattering amplitudes and renormalization. For instance, in enumerating basis elements for MZVs up to weight 18, the transformation T(a,b) = ∑_{c|a,b} μ(c) (a/c + b/c)! / ((a/c)! (b/c)!) determines the dimension of irreducible sums, supporting conjectures on their structure in QFT computations.[38] In statistical mechanics, μ(n) arises in probabilistic models for square-free numbers inspired by random surface configurations, where limit theorems for random variables tied to prime factorizations mimic ensemble averages. Additionally, through inclusion-exclusion principles generalized via Möbius inversion, μ(n) counts signed lattice configurations in models like dimers or Ising systems on periodic graphs, correcting for overcounting in partition functions. The primon gas, or Riemann gas, provides a toy model where the bosonic partition function is the Riemann zeta function ζ(s), while the fermionic counterpart involves 1/ζ(s) = ∑ μ(n)/n^s, illustrating supersymmetric balances in energy levels log p for primes p. In string theory, the number-theoretic Möbius function contributes to partition functions via the Riemann gas framework, where μ(n) encodes fermionic contributions inverting the bosonic zeta-function spectrum, linking worldsheet modular invariance to arithmetic structures. As of 2024, analogies from random matrix theory model the statistics of L-function zeros—governed by explicit formulas involving μ(n)—to study quantum chaos in arithmetic systems, such as spectral correlations in chaotic billiards mirroring Möbius randomness.[39][40]Generalizations
In Incidence Algebras
The Möbius function admits a profound generalization to the setting of partially ordered sets (posets) through the framework of incidence algebras, as formalized by Gian-Carlo Rota in his seminal 1964 paper.[41] For a locally finite poset , the incidence algebra consists of all functions such that whenever , equipped with pointwise addition and a convolution product defined byRelated Functions
The Liouville function is defined as , where counts the total number of prime factors of with multiplicity.[43] It relates to the Möbius function via the identity .[44] This connection arises from the Dirichlet series representation , reflecting how modifies the sign based on total prime multiplicity while incorporating square factors through the Möbius term.[44] In 1963, Constantin P. Popovici introduced a generalization as the -fold Dirichlet convolution of the Möbius function with itself, so that and higher correspond to repeated convolutions.[45] This construction preserves multiplicativity and generalizes inversion formulas for sums over multiple convolutions, with applications to higher-order zeta function identities like .[45] The Jordan totient function generalizes Euler's totient and is given by , counting the number of -tuples modulo with no common divisor greater than 1. For , it reduces to , and the formula follows from Möbius inversion applied to the identity . This sum modifies the Möbius contribution by weighting with powers, emphasizing higher-dimensional coprimality. Additionally, serves as the characteristic function of square-free positive integers, taking value 1 if is square-free and 0 otherwise, since precisely when has no squared prime factors.[46] Unlike the classical , which includes sign based on the number of distinct primes, focuses solely on the support (square-freeness) without sign alternation. These variants alter the Möbius function's sign or domain to suit specific arithmetic properties, such as multiplicity counting or higher convolutions.Computation
Algorithms
To compute the Möbius function μ(n) for a single integer n, the standard approach begins with the prime factorization of n. Once the prime factors are obtained, μ(n) is determined by the definition: μ(n) = 0 if n has a repeated prime factor (i.e., is not square-free), μ(n) = 1 if n is a square-free positive integer with an even number of distinct prime factors, and μ(n) = -1 if it has an odd number.[2] For small to moderate n, trial division suffices for factorization: divide n successively by all integers from 2 up to √n, tracking the primes and their multiplicities. This method has time complexity O(√n) in the worst case but is practical for n up to around 10^12 on standard hardware.[2] For larger n, more advanced factorization algorithms like Pollard's rho method are employed, which finds a non-trivial factor in expected time O(√p) where p is the smallest prime factor of n, making it efficient for numbers with factors up to 10^20 or so.[47] For batch computation of μ(n) for all n ≤ x, sieve methods based on variants of the Sieve of Eratosthenes are used, achieving near-optimal efficiency. A basic implementation runs in O(x log log x) time by initializing an array of size x, marking multiples of each prime to identify square factors and count distinct primes per number. The linear sieve improves this to O(x) time by ensuring each composite number is visited only once, using the smallest prime factor (SPF) array. The algorithm proceeds as follows: generate primes up to x via a linear pass, computing the SPF for each integer; then, for each n, factorize using the SPF chain to check square-freeness and count distinct primes, setting μ(n) accordingly (e.g., μ(p) = -1 for primes p, μ(1) = 1, and 0 for non-square-free n). This also enables simultaneous computation of related functions like Euler's totient via Möbius inversion.[48] For very large x (e.g., up to 10^16), segmented sieves process the range in blocks of size fitting available memory, precomputing small primes up to √x and sieving each segment independently. This adapts the linear sieve to handle massive scales, with overall time complexity still O(x log log x) but practical space usage around 50 GB for x = 10^16, as demonstrated in computations of the Mertens function (the partial sum of μ(n)). Such methods represent the state-of-the-art for batch evaluation, with the linear sieve variant providing the optimal asymptotic complexity for dense computation up to x.[48]Software Implementations
The Möbius function is implemented in several mathematical software systems, leveraging efficient factorization or sieving methods to compute its value based on the prime factors of . These implementations facilitate computations in number theory applications, such as inclusion-exclusion principles or Dirichlet series evaluations.[49] In SageMath, the functionmobius(n) computes for a positive integer by first obtaining the prime factorization of using Sage's built-in integer factorization routines, then applying the definition: if has a squared prime factor, , and otherwise, where is the number of distinct prime factors. This approach integrates seamlessly with Sage's broader arithmetic capabilities, allowing for vectorized computations via mobius_range(start, stop, step). For example:
sage: mobius(30)
-1
sage: mobius_range(1, 10)
[1, -1, -1, 0, -1, 1, -1, 0, 0, 1]
The implementation is documented in the SageMath reference manual.[49]
PARI/GP provides the moebius(x) function to evaluate for nonzero integer , relying on its highly optimized factoring engine, which employs multiple algorithms including the elliptic curve method (ECM) for efficient handling of large composites. This makes it particularly suitable for computing for large , where factorization speed is critical. ECM in PARI/GP is activated for numbers beyond small trial division limits, contributing to subexponential performance in practice. An example usage in GP:
gp> moebius(30)
-1
gp> moebius(1000000007) \\ a large prime
-1
The function is part of PARI/GP's arithmetic functions module, with ECM details outlined in the system's factorization documentation.[50]
In Python's SymPy library, the Möbius function is accessible via sympy.functions.combinatorial.numbers.mobius(n) for single values, computed through prime factorization similar to other systems; since version 1.13, the older sympy.ntheory.mobius(n) is deprecated in favor of this combinatorial interface. For computing over vectors or ranges, SymPy uses the sieve.mobiusrange(a, b) method, which employs a sieve-based approach akin to the Eratosthenes sieve to generate values efficiently up to a limit. Example:
from sympy import mobius, [sieve](/page/Sieve)
print(mobius(30)) # -1
print(list([sieve](/page/Sieve).mobiusrange(1, 10))) # [1, -1, -1, 0, -1, 1, -1, 0, 0, 1]
This sieving capability is ideal for batch computations in analytic number theory tasks. The implementation is detailed in SymPy's number theory and combinatorial modules documentation.[51][52][53]
Mathematica implements the Möbius function as MoebiusMu[n], which returns for positive integer and supports symbolic manipulation alongside numerical evaluation. It uses internal factorization optimized for both small and large inputs, integrating with Mathematica's broader number theory toolkit. For instance:
MoebiusMu[30]
(* -1 *)
Table[MoebiusMu[n], {n, 1, 10}]
(* {1, -1, -1, 0, -1, 1, -1, 0, 0, 1} *)
This function is part of Mathematica's core integer functions and is suitable for both standalone computations and within larger symbolic expressions.[54]
Performance comparisons across these systems highlight differences in efficiency, particularly for large . Benchmarks indicate that PARI/GP generally outperforms Mathematica and SymPy for factoring large integers, a key step in single computations, due to its specialized optimizations like ECM for semiprimes. SymPy's sieving excels for range-based tasks up to moderate limits like . Basic trial division or Pollard rho algorithms underpin smaller cases across all tools.[55]