On this page
If you have met the divisor count, the divisor sum and Euler's totient as three separate formulas, Dirichlet convolution shows they are one idea: a way of multiplying functions on the positive integers. Below are the definition, the key identities, why they hold, and a full check for n = 12.
What is Dirichlet convolution?
An arithmetic function is any function from the positive integers to the complex numbers, such as n² or the number of divisors of n.
The Dirichlet convolution of two arithmetic functions f and g is the function (f*g)(n) = Σ f(d)g(n/d), where the sum runs over all positive divisors d of n (Wikipedia: Dirichlet convolution).
Equivalently, you sum f(a)g(b) over every ordered pair (a, b) with ab = n. For n = 6, (f*g)(6) = f(1)g(6) + f(2)g(3) + f(3)g(2) + f(6)g(1). The same article notes the operation is commutative, associative and distributive over addition.
For full proofs, a standard text is Tom M. Apostol's Introduction to Analytic Number Theory (Springer, 1976); Wikipedia cites its Chapter 2 for Dirichlet inverses.
Which functions do you need to know?
A handful of functions do almost all the work:
ε, the identity element: ε(1) = 1 and ε(n) = 0 for every n > 1.
1, the constant function: 1(n) = 1 for all n.
id, the identity function: id(n) = n.
d(n), the number of divisors of n (also written τ(n)), and σ(n), the sum of the divisors.
φ(n), Euler's totient: how many of 1, 2, ..., n share no factor with n.
The identity element is ε because (f*ε)(n) = Σ f(d)ε(n/d), and ε(n/d) is zero unless d = n, so only f(n) survives (Wikipedia).
Why are d = 1*1, σ = id*1 and φ*1 = id true?
All three are in Wikipedia's list of convolution relations, and each reads off the definition.
d = 1*1: (1*1)(n) = Σ 1·1 over the divisors of n, which counts them.
σ = id*1: (id*1)(n) = Σ d·1 over the divisors, which adds them up.
φ*1 = id: write the fractions 1/n, 2/n, ..., n/n and reduce each to lowest terms. Every reduced fraction has a denominator that divides n, and exactly φ(d) of them have denominator d. The n fractions are shared out among the divisors, so Σ φ(d) = n.
Worked table for n = 12
Each divisor pair adds a term to 1*1, id*1 and φ*1:
d = 1, 12/d = 12: adds 1, 1 and φ(1) = 1
d = 2, 12/d = 6: adds 1, 2 and φ(2) = 1
d = 3, 12/d = 4: adds 1, 3 and φ(3) = 2
d = 4, 12/d = 3: adds 1, 4 and φ(4) = 2
d = 6, 12/d = 2: adds 1, 6 and φ(6) = 2
d = 12, 12/d = 1: adds 1, 12 and φ(12) = 4
Totals: d(12) = 6, σ(12) = 1 + 2 + 3 + 4 + 6 + 12 = 28, and (φ*1)(12) = 1 + 1 + 2 + 2 + 2 + 4 = 12, which is id(12).
Check the totient column with fractions: reducing 1/12 to 12/12 gives four with denominator 12 (1/12, 5/12, 7/12, 11/12), two each with denominators 6, 4 and 3, and one each with 2 and 1. Those are the φ values above.
Why does convolution keep functions multiplicative?
A function f is multiplicative if f(1) = 1 and f(mn) = f(m)f(n) whenever m and n share no common factor. The Dirichlet convolution of two multiplicative functions is again multiplicative, and the sum of two multiplicative functions is not (Wikipedia).
The reason: if m and n are coprime, every divisor of mn splits in exactly one way as a divisor of m times a divisor of n, so the sum for mn factors into the sum for m times the sum for n.
Since 1 and id are multiplicative, so are d and σ. On 12 = 4 × 3: d(4)d(3) = 3 × 2 = 6 and σ(4)σ(3) = 7 × 4 = 28, matching the table. For large n, factor into prime powers and multiply.
How should you practise convolution?
One number at a time:
Pick n = 18, 20 or 30 and list the pairs (d, n/d).
Fill in the 1*1, id*1 and φ*1 columns as above.
Recheck d(n) and σ(n) over prime powers, and φ*1 = n with reduced fractions.
Bonus: convolve φ*1 = id with 1 to get φ*d = σ, and test it at 12.
Turn it round: our explainer on the Möbius function and Möbius inversion shows how to recover f from f*1.
For divisors as a structure, read Dilworth's theorem and the divisors of 60; for where Dirichlet's ideas lead, see primes in arithmetic progressions.
If a definition such as multiplicative or totient will not settle, look it up in the Fermi Concept Library. To check your working on a divisor-sum problem, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.



