21.11.01 · number-theory / dirichlet-series-arithmetic-functions

Arithmetic Functions, Dirichlet Convolution, and Möbius Inversion

shipped3 tiersLean: none

Anchor (Master): Apostol 1976 *Introduction to Analytic Number Theory* Ch. 2-3 (the Dirichlet-convolution ring, Bell series, averages); Möbius 1832 *Crelle* 9 (originator of the inversion function); Dedekind 1857 and Liouville 1857 (early systematic use of the convolution and multiplicativity); McCarthy 1986 *Introduction to Arithmetical Functions* (Springer Universitext); Tóth 2014 survey *Multiplicative arithmetic functions of several variables*

Intuition Beginner

Number theory is full of functions that read off some feature of a whole number from its factorisation. How many divisors does have? What is the sum of those divisors? How many numbers below share no common factor with it? Each of these is an arithmetic function — a rule that takes a positive whole number and returns a number. The number has six divisors (); their sum is ; and exactly four numbers below () share no factor with it. Three different functions, all reading .

The surprise is that these functions are not isolated. There is a single multiplication rule that ties them together. To combine two arithmetic functions and at the number , you run over every way of splitting into an ordered pair of factors and , multiply by , and add up the results. This combining rule is called the Dirichlet convolution, written . It behaves like ordinary multiplication: you can reorder, regroup, and there is a "do-nothing" function that leaves everything unchanged.

One special function, the Möbius function , acts as an undo button. If you build a function by summing another function over divisors, the Möbius function lets you recover from . This recovery trick — Möbius inversion — turns hard sums into easy ones and is the reason the Möbius function appears throughout number theory.

Visual Beginner

A diagram showing the number at the centre with its six divisors branching out, paired so that each divisor sits opposite its partner : with , with , with . Each pairing is one term in a Dirichlet convolution. Beside it, a small table lists the Möbius function on the first several numbers, showing the pattern of , , and .

The value is when is a product of an even number of distinct primes (and for ), for an odd number of distinct primes, and whenever a prime is repeated. The zeros at mark the numbers divisible by a square.

Worked example Beginner

Build the divisor-counting function as a convolution, and check it at .

Let be the function that is equal to at every number. The convolution at runs over every factor pair and , multiplies by , and adds. Each pair contributes , so at simply counts the divisors of . This counting function is called .

Step 1. List the divisors of : they are . There are six of them, so .

Step 2. Check this against the convolution. The factor pairs of are — six ordered pairs. Each contributes . The total is , matching .

Step 3. Try a prime power for contrast. For the divisors are , four of them, so . A prime power always has divisors, since the exponent can be any value from to .

What this tells us: a familiar counting function is secretly the convolution of the simplest function (the constant ) with itself. Recognising functions as convolutions is what lets a single algebraic rule organise the whole subject.

Check your understanding Beginner

Formal definition Intermediate+

An arithmetic function is a function . The set of all arithmetic functions is denoted . Following Apostol [Apostol Ch. 2], carries an algebraic structure richer than pointwise operations.

Definition (Dirichlet convolution). For , the Dirichlet convolution (or Dirichlet product) is $$ (f * g)(n) = \sum_{d \mid n} f(d) , g!\left(\frac{n}{d}\right) = \sum_{\substack{ab = n \ a, b \geq 1}} f(a) , g(b), $$ the sum ranging over the ordered factorisations into positive integers.

Definition (distinguished functions). Several arithmetic functions recur throughout the theory.

  • The identity for convolution is and for .
  • The unit function is for all .
  • The power functions are ; in particular and is .
  • The Möbius function is , if is a product of distinct primes, and if is divisible by the square of a prime.
  • The Euler totient .
  • The divisor functions , so ; the special cases (number of divisors) and (sum of divisors).
  • The von Mangoldt function if is a prime power () and otherwise.
  • The Liouville function , where counts prime factors with multiplicity.

Definition (multiplicative and completely multiplicative). An arithmetic function with is multiplicative if whenever , and completely multiplicative if for all . The functions are multiplicative; are completely multiplicative; is neither.

The triple — pointwise addition and Dirichlet convolution — is a commutative ring with multiplicative identity . The notation denotes the arithmetic function , an element of (registered in _meta/NOTATION.md).

Counterexamples to common slips

  • " is completely multiplicative." It is multiplicative but not completely so: . Multiplicativity only constrains coprime arguments, and is not coprime to itself. Completely multiplicative functions are determined by their values on primes alone; multiplicative ones need values on all prime powers.
  • " counts divisors." The divisor count is ; the divisor sum is . At : but .
  • "The convolution sums ." The second argument is the complementary divisor , not . The operation is not the Dirichlet convolution and is not associative in the same way.
  • " is multiplicative." It is not: , so it fails even the normalisation that every multiplicative function obeys. Its role is via the identity , not through multiplicativity.

Key theorem with proof Intermediate+

The signature theorem is the Möbius inversion formula, which expresses the invertibility of the unit function under Dirichlet convolution. Its content is that is the Dirichlet inverse of .

Theorem (Möbius inversion). *In the ring the Möbius function is the convolution inverse of the unit function :* $$ \mu * \mathbf{1} = \varepsilon, \qquad \text{i.e.} \qquad \sum_{d \mid n} \mu(d) = \begin{cases} 1 & n = 1, \ 0 & n > 1. \end{cases} $$ Consequently, for arithmetic functions , $$ g = f * \mathbf{1} \quad \Longleftrightarrow \quad f = g * \mu, $$ that is, for all if and only if for all .

Proof. We first establish . At the only divisor is , so . Fix and write its prime factorisation with . Because whenever has a repeated prime factor, the only divisors of contributing to are the squarefree ones, namely the products of subsets of . A subset of size yields a divisor with , and there are such subsets. Hence $$ \sum_{d \mid n} \mu(d) = \sum_{j=0}^{r} \binom{r}{j} (-1)^j = (1 - 1)^r = 0, $$ by the binomial theorem, since . This proves .

Now suppose . Convolving on the right with and using associativity and commutativity of together with : $$ g * \mu = (f * \mathbf{1}) * \mu = f * (\mathbf{1} * \mu) = f * \varepsilon = f. $$ Conversely, if , then . Writing the convolutions out as divisor sums gives the stated formulas, where at is .

Bridge. Möbius inversion builds toward 21.12.01 the prime number theorem, where the von Mangoldt identity — itself an inversion of — converts the prime-counting problem into the analytic study of , and it appears again in 21.13.01 Dirichlet -functions, where the same inversion organises characters. The foundational reason the formula works is that is a unit of the convolution ring with inverse exactly ; this is exactly the statement that summing over divisors and Möbius-weighting are inverse linear operations. The construction generalises: any arithmetic function with has a Dirichlet inverse, so inversion against is one instance of a ring-theoretic fact. Putting these together, the totient identity (Master tier below) is read off as the Möbius inversion of , and the bridge from the multiplicative arithmetic of 21.01.02 to the Dirichlet-series analysis of 21.03.01 runs through this single ring.

Exercises Intermediate+

Lean formalization Intermediate+

Mathlib carries the convolution ring of arithmetic functions and the Möbius machinery, so the statements of this unit are expressible directly. The companion notes record the load-bearing declarations against Mathlib.NumberTheory.ArithmeticFunction.

-- Operative imports: Mathlib.NumberTheory.ArithmeticFunction
import Mathlib.NumberTheory.ArithmeticFunction
open ArithmeticFunction
open scoped ArithmeticFunction.Moebius ArithmeticFunction.zeta

-- Dirichlet convolution is the `*` of the CommRing instance on ArithmeticFunction R.
#check (inferInstance : CommRing (ArithmeticFunction ℂ))

-- The convolution identity ε is the `1` of the ring (one n = if n = 1 then 1 else 0).
example : (1 : ArithmeticFunction ℂ) 1 = 1 := by simp

-- μ * ζ = ε : the Möbius function is the Dirichlet inverse of the unit function 𝟙
-- (Mathlib's `zeta` is the unit function, value 1 on positive n, 0 on 0).
#check @ArithmeticFunction.moebius_mul_coe_zeta
-- ArithmeticFunction.moebius_mul_coe_zeta : μ * ↑ζ = 1

-- Möbius inversion, abstract form over an additive commutative group:
#check @ArithmeticFunction.sum_eq_iff_sum_smul_moebius_eq
-- (∀ n, 0 < n → g n = ∑ d ∈ n.divisors, f d) ↔
--   (∀ n, 0 < n → f n = ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2)

-- The von Mangoldt identity Λ * ζ = log, equivalently Λ = μ * log:
#check @ArithmeticFunction.vonMangoldt_mul_zeta
-- ArithmeticFunction.vonMangoldt_mul_zeta : Λ * ↑ζ = log

-- Multiplicativity is preserved by convolution:
#check @ArithmeticFunction.IsMultiplicative.mul
-- IsMultiplicative f → IsMultiplicative g → IsMultiplicative (f * g)

The gap documented in the unit metadata's Mathlib gap analysis is not the absence of these objects — Mathlib has them — but the absence of a single pedagogical module that proves the Dirichlet-inverse existence recursion, the subgroup structure of multiplicative functions under the units, the Bell-series criterion, and the formal-Dirichlet-series ring homomorphism with its Euler factorisation, end to end and in one place.

Advanced results Master

Theorem 1 (the convolution ring; Cashwell-Everett 1959). The ring of arithmetic functions over under pointwise addition and Dirichlet convolution is a commutative ring with identity ; its group of units is , with inverses given by the recursion of Exercise 4 [Apostol Ch. 2]. More is true: Cashwell and Everett 1959 Pacific J. Math. 9 proved that over a field is an integral domain, indeed a unique factorisation domain, isomorphic to the ring of formal power series in countably many variables (one variable per prime), via for . The absence of zero divisors follows from the order , which is multiplicative under convolution: in the sense that the least nonzero index multiplies.

Theorem 2 (multiplicative functions form a group). The multiplicative functions, together with excluded in favour of as the multiplicative-unit reference, form an abelian group under Dirichlet convolution: if are multiplicative then is multiplicative (Exercise 7), and the Dirichlet inverse of a multiplicative is again multiplicative. The completely multiplicative functions are not closed under convolution — is multiplicative but not completely so — but a completely multiplicative has the especially simple inverse (pointwise product), since by a direct check using . This recovers as the case .

Theorem 3 (the totient identities). The Euler totient satisfies , equivalently Gauss's identity ; Möbius inversion then yields , i.e. . The product form follows because is a convolution of multiplicative functions, hence multiplicative, and on a prime power . The Dirichlet series is for , read off from via the dictionary and [Hardy-Wright].

Theorem 4 (Dirichlet series dictionary and Euler products). The assignment is a ring homomorphism from to the ring of formal Dirichlet series: and . Under , the distinguished functions map to recognisable series: , , , , , , , and (from and ). For multiplicative , factors as the Euler product (Exercise 8); for completely multiplicative the Bell series collapses to a geometric series, giving the single-factor Euler product .

Theorem 5 (Bell series and local multiplicativity). For a prime and a multiplicative , the Bell series is the formal power series . Bell series convert Dirichlet convolution into ordinary power-series multiplication locally: for multiplicative [McCarthy]. This reduces identities among multiplicative functions to identities among power series, prime by prime. For instance , , and , recovering at the level of each prime; and confirms .

Theorem 6 (averages and the hyperbola method). Convolution structure controls average orders. Dirichlet's hyperbola method 1849 [Dirichlet 1849] computes by exploiting and summing over the hyperbola , splitting at to avoid double counting. Similarly , where the constant comes from and the value . The Möbius function's own partial sums — the Mertens function — encode the prime number theorem: is equivalent to PNT, and is equivalent to the Riemann hypothesis.

Synthesis. The Dirichlet convolution is the foundational reason the disparate arithmetic functions of 21.01.02 and 21.01.04 form a single coherent theory rather than a list of definitions, and this is exactly the bridge from elementary multiplicativity to the analytic machinery of 21.03.01. The central insight is that is a commutative ring in which is a unit with inverse ; Möbius inversion is then nothing more than convolving with that inverse, and every classical inversion identity — , , the Liouville-square identity — is one instance. Putting these together, the Dirichlet-series homomorphism generalises the ring structure into analysis: convolution becomes multiplication of series, multiplicativity becomes the Euler product, and the position of the zeros of becomes the position of the cancellation in . The pattern is dual to harmonic analysis on the multiplicative monoid : the Bell series localise convolution at each prime exactly as a Fourier transform diagonalises ordinary convolution, and the Euler product is the statement that the monoid is freely generated by the primes. This freeness, established by unique factorisation in 21.01.02, is what makes the whole apparatus run, and it generalises to the convolution algebras of -functions in 21.13.01 and the Hecke algebras of 21.04.01, where the same convolution-to-Euler-product dictionary organises automorphic objects.

Full proof set Master

Proposition 1 (completely multiplicative inverse). If is completely multiplicative, then its Dirichlet inverse is , the pointwise product.

Proof. Compute . For completely multiplicative we have for every divisor , so the factor pulls out: $$ (\mu f * f)(n) = f(n) \sum_{d \mid n} \mu(d) = f(n), \varepsilon(n). $$ For this is ; for it is . Hence , so . The step uses complete multiplicativity without any coprimality hypothesis, which is why the simple formula holds only for completely multiplicative (for merely multiplicative the inverse is more involved).

Proposition 2 (Dirichlet inverse of a multiplicative function is multiplicative). If is multiplicative with , its Dirichlet inverse is multiplicative.

Proof. Let be the multiplicative function defined on prime powers by the local inverse: on each prime power , set by the recursion of Exercise 4 applied to the Bell series, and extend multiplicatively to all via . By Exercise 7 the convolution of two multiplicative functions is multiplicative, and on each prime power by construction of . A multiplicative function is determined by its values on prime powers, and is multiplicative with for , ; since and agree on all prime powers and both are multiplicative, . Therefore and is multiplicative.

Proposition 3 (Bell-series multiplicativity). For multiplicative and a prime , as formal power series.

Proof. The coefficient of in is . Since the divisors of are exactly , the convolution at is , the same coefficient. Hence the power series and have identical coefficients.

Proposition 4 (Möbius inversion in the dual/multiplicative form). Let . Then for all if and only if for all .

Proof. Take logarithms: set and as arithmetic functions (assuming positive-real, or working in a fixed branch). The hypothesis becomes additively. By the Key Theorem, , i.e. . Exponentiating gives . The equivalence is exactly the additive Möbius inversion transported across the logarithm, which is a ring isomorphism from to applied pointwise.

Connections Master

  • The convolution ring is built on the unique factorisation of 21.01.02: the freeness of the multiplicative monoid on the primes is what makes Bell-series localisation and the Euler product valid, and the Möbius function is the inversion datum for the partial order of divisibility studied there.

  • The Dirichlet-series dictionary feeds directly into 21.03.01, where and ; the analytic continuation and Euler product of developed there are the analytic shadow of the algebraic identities and the multiplicativity proven here.

  • The von Mangoldt identity established here is the entry point to 21.12.01 the prime number theorem, where converts the prime-counting average into a contour integral controlled by the zeros of .

  • Characters and twisted convolutions generalise this ring in 21.13.01 Dirichlet -functions and characters, where multiplicative functions twisted by a Dirichlet character retain the Euler-product structure and Möbius inversion organises the orthogonality relations.

  • The Euler totient identities and specialise the elementary congruence theory of 21.01.04 (Fermat-Euler), where is the order of the unit group that powers Euler's theorem.

Historical & philosophical context Master

The Möbius function entered mathematics in August Ferdinand Möbius's 1832 Crelle paper Über eine besondere Art von Umkehrung der Reihen [Möbius 1832], where it arose as the coefficient sequence inverting a class of infinite series, well before the divisor-convolution framing existed. Möbius worked with the inversion of formal series and was not thinking of an algebra on arithmetic functions; the recognition that his function is the Dirichlet inverse of the constant function came later, through the systematic study of what we now call Dirichlet multiplication.

That algebraic reframing is due to several hands in the mid-nineteenth century. Dirichlet's 1849 study of mean values [Dirichlet 1849] used divisor sums and the hyperbola method without naming the convolution as a ring operation. Liouville's 1857 notes [Liouville 1857] introduced the completely multiplicative function and exploited convolution identities freely. The clean statement that arithmetic functions form a commutative ring under , with the inverse of , was consolidated in the analytic-number-theory texts of the twentieth century; Apostol's 1976 treatment [Apostol Ch. 2] is the canonical pedagogical source, and the ring-theoretic depth — that over a field is a unique factorisation domain isomorphic to a power-series ring — was settled by Cashwell and Everett in 1959.

The conceptual payoff is the dictionary between an algebraic operation on arithmetic functions and an analytic operation on Dirichlet series. Riemann's 1859 treatment of as a function of a complex variable supplied the analytic side; the convolution ring supplies the algebraic side; and the homomorphism connecting them is the reason that statements about prime distribution can be translated into statements about a meromorphic function and back.

Bibliography Master

@book{apostol1976ant,
  author    = {Apostol, Tom M.},
  title     = {Introduction to Analytic Number Theory},
  series    = {Undergraduate Texts in Mathematics},
  publisher = {Springer-Verlag},
  year      = {1976},
  note      = {Chapter 2: arithmetical functions and Dirichlet multiplication}
}

@article{moebius1832umkehrung,
  author  = {M\"{o}bius, August Ferdinand},
  title   = {\"{U}ber eine besondere Art von Umkehrung der Reihen},
  journal = {Journal f\"{u}r die reine und angewandte Mathematik (Crelle)},
  volume  = {9},
  pages   = {105--123},
  year    = {1832}
}

@article{liouville1857fonctions,
  author  = {Liouville, Joseph},
  title   = {Sur quelques fonctions num\'{e}riques},
  journal = {Journal de Math\'{e}matiques Pures et Appliqu\'{e}es (2)},
  volume  = {2},
  pages   = {56--64},
  year    = {1857}
}

@article{cashwell1959ufd,
  author  = {Cashwell, E. D. and Everett, C. J.},
  title   = {The ring of number-theoretic functions},
  journal = {Pacific Journal of Mathematics},
  volume  = {9},
  number  = {4},
  pages   = {975--985},
  year    = {1959}
}

@book{hardywright2008,
  author    = {Hardy, G. H. and Wright, E. M.},
  title     = {An Introduction to the Theory of Numbers},
  edition   = {6},
  publisher = {Oxford University Press},
  year      = {2008},
  note      = {Revised by D. R. Heath-Brown and J. H. Silverman}
}

@book{mccarthy1986,
  author    = {McCarthy, Paul J.},
  title     = {Introduction to Arithmetical Functions},
  series    = {Universitext},
  publisher = {Springer-Verlag},
  year      = {1986}
}