The von Mangoldt Function, the Chebyshev Psi Function, and the Logarithmic Derivative of Zeta
Anchor (Master): Davenport 2000 *Multiplicative Number Theory* 3e §12-17 (the Hadamard product for $\xi(s)$, the partial-fraction expansion of $\zeta'/\zeta$, the explicit formula for $\psi(x)$ and the PNT contour proof); Riemann 1859 *Ueber die Anzahl der Primzahlen unter einer gegebenen Grosse*; von Mangoldt 1895 *Crelle* 114 (the explicit formula); Edwards 1974 *Riemann's Zeta Function* (Academic Press) Ch. 3; Montgomery-Vaughan 2007 *Multiplicative Number Theory I* (Cambridge UP) Ch. 12
Intuition Beginner
The primes look random when you list them, but their counting function hides a startling regularity. To see it you first change what you count. Instead of giving each prime the weight , give the prime the weight , and give each prime power that same weight as well. Add these weights up to a cutoff and you get a running total called . This weighted count grows almost exactly like itself, far more cleanly than the raw prime count does.
Why weight primes by their logarithm? Because logarithms turn the multiplicative world of factorisation into the additive world of sums, and the zeta function of Euler and Riemann is the bridge between the two. When you take the logarithm of Euler's product formula for zeta and then track how fast it changes, the prime-power weights fall out automatically, one term for each prime power. So is not an artificial bookkeeping device — it is exactly the quantity the zeta function knows how to compute.
Here is the payoff, which Riemann saw in 1859. The places where the zeta function equals zero act like the frequencies of a vibrating string. Each zero contributes a small oscillating wave to , and when you add the main growth to all these waves, you recover the exact count of prime powers. The primes are not random; they are the sound of the zeros of one function.
Visual Beginner
Picture two staircases drawn on the same axes. The first is the weighted prime-power count : it climbs from left to right, jumping by each time passes a prime power. Laid over it is a smooth straight line of slope one, the line . The staircase hugs that line, wandering above and below by only a little. The small wandering is the combined effect of the zeros of the zeta function, each one adding a gentle wave.
| (approx.) | ||
|---|---|---|
The ratio creeps toward one. That single fact — that the weighted prime count is asymptotically just — is the prime number theorem, and the table is its numerical shadow.
Worked example Beginner
Build the weighted count by hand and watch the logarithmic derivative appear.
Step 1. List the prime powers up to : the powers of are ; the powers of are ; then the single primes and . Each power of carries the weight , each power of carries , and and carry and .
Step 2. Add the weights: $$ \psi(10) = 3\log 2 + 2\log 3 + \log 5 + \log 7 = \log!\big(2^3 \cdot 3^2 \cdot 5 \cdot 7\big) = \log 2520 \approx 7.83. $$ So the weighted count at is , and the ratio to is — already in the right ballpark.
Step 3. See where the weights come from. Euler's product writes zeta as a multiplication over primes. Taking the logarithm turns the product into a sum, and asking how fast that sum changes term by term hands back exactly the weight attached to each prime power . The list of weights you just summed is the same list that the derivative of produces.
What this tells us: is the logarithm of the product of all prime powers up to , and this same list of weights is what you read off the zeta function by differentiating its logarithm. The weighted count and the zeta function are two views of one object.
Check your understanding Beginner
Formal definition Intermediate+
Throughout, is a complex variable, ranges over primes, is the natural logarithm, and is the Riemann zeta function of 21.03.01 and 06.01.16, with its Euler product valid for . We follow Davenport [Davenport §12].
Definition (von Mangoldt function). The von Mangoldt function is
$$
\Lambda(n) = \begin{cases} \log p & \text{if } n = p^m \text{ for a prime } p \text{ and integer } m \geq 1,\ 0 & \text{otherwise.}\end{cases}
$$
It satisfies the convolution identity , i.e. , established in 21.11.03.
Definition (Chebyshev psi function). For real , the Chebyshev psi function is the summatory function of ,
$$
\psi(x) = \sum_{n \leq x} \Lambda(n) = \sum_{p^m \leq x} \log p.
$$
It is the prime-counting weight natural to the analytic theory: the prime number theorem reads , equivalent to by 21.11.03.
Definition (logarithmic derivative of zeta). For , where , the logarithmic derivative is the meromorphic function . The central object of this unit is its negative, .
The notation , the summatory , the variable , the critical zeros , and the symbol for the digamma function are recorded in _meta/NOTATION.md. A critical zero of is a zero with ; the elementary zeros are the points forced by the functional equation of 06.01.16.
Counterexamples to common slips
- " is entire because has a pole, not a zero, at ." The logarithmic derivative has a pole wherever has either a zero or a pole. The simple pole of at produces a simple pole of with residue , hence a pole of with residue . This is the main term in the explicit formula.
- "The Dirichlet series converges in the critical strip." It converges only for . The values of inside the strip come from meromorphic continuation, not from the series; the contour proof of the prime number theorem moves the integration line left of precisely to access the continuation.
- "Each critical zero contributes to ." Each simple zero contributes the term to the explicit formula, an oscillating wave of size . The residue of at a zero of multiplicity is , not a logarithm.
Key theorem with proof Intermediate+
The signature identity of the unit expresses the logarithmic derivative of zeta as the Dirichlet series generated by the von Mangoldt function. It is the analytic bridge: the left side is a single complex-analytic object carrying the zeros and the pole of ; the right side is the prime-power weight whose partial sums are .
Theorem (logarithmic derivative as a von Mangoldt series). For , $$ -\frac{\zeta'(s)}{\zeta(s)} = \sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{s}}. $$
Proof. Fix with . By the Euler product of 21.03.01, , with the product absolutely convergent and every factor non-zero, so and is defined by the absolutely convergent sum
$$
\log\zeta(s) = -\sum_p \log!\big(1 - p^{-s}\big) = \sum_p \sum_{m=1}^{\infty} \frac{p^{-ms}}{m},
$$
using the power series for . Differentiating term by term — justified because the differentiated series converges absolutely and uniformly on compact subsets of , where it is dominated by — gives
$$
\frac{\zeta'(s)}{\zeta(s)} = \frac{d}{ds}\log\zeta(s) = \sum_p \sum_{m=1}^{\infty} \frac{-\log p}{m} \cdot m, p^{-ms} = -\sum_p \sum_{m=1}^{\infty} (\log p), p^{-ms}.
$$
Now collect by the integer . The coefficient of is when is a prime power and otherwise — exactly . Hence , and negating yields the claim.
Bridge. This identity builds toward the prime number theorem and appears again in 21.11.04 Perron's formula, where integrating along a vertical line recovers as a sum of residues. The foundational reason the identity matters is that it converts a question about the zeros of one analytic function into a statement about prime counts: this is exactly the move from the elementary of 21.11.03 to the analytic , the bridge being the residue at , which contributes the main term , while the critical zeros contribute the lower-order waves. The central insight is that has a simple pole of residue at and a simple pole of residue at each simple zero ; putting these together through Perron's formula generalises Chebyshev's two-sided bound into the precise asymptotic, and the whole construction is dual to the Euler product, which is where the von Mangoldt weights were born.
Exercises Intermediate+
Lean formalization Intermediate+
Mathlib carries the von Mangoldt function, its key convolution identity, the L-series machinery, and an analytically continued Riemann zeta with a zero-free statement on the line . The companion notes record the load-bearing declarations.
-- Operative imports: Mathlib.NumberTheory.VonMangoldt,
-- Mathlib.NumberTheory.LSeries.Dirichlet,
-- Mathlib.NumberTheory.LSeries.RiemannZeta
import Mathlib.NumberTheory.VonMangoldt
import Mathlib.NumberTheory.LSeries.Dirichlet
open ArithmeticFunction
-- The von Mangoldt function Λ; ψ(x) = ∑_{n ≤ x} Λ(n) is its summatory function.
#check (vonMangoldt : ArithmeticFunction ℝ)
-- vonMangoldt n = if IsPrimePow n then Real.log (minFac n) else 0
-- The convolution identity log = Λ * 𝟙, the foundation of Λ = μ * log:
#check @ArithmeticFunction.vonMangoldt_mul_zeta
-- vonMangoldt * ↑ζ = log
#check @ArithmeticFunction.log_eq_vonMangoldt_mul_zeta
-- The L-series of Λ equals -ζ'/ζ on Re(s) > 1 (the unit's key theorem):
#check @LSeries.vonMangoldt
-- LSeries (fun n => Λ n) s = - deriv riemannZeta s / riemannZeta s (Re s > 1)
-- The analytically continued zeta and the zero-free line Re(s) = 1:
#check @riemannZeta_ne_zero_of_one_le_re
-- 1 ≤ s.re → s ≠ 1 → riemannZeta s ≠ 0The gap documented in the unit metadata's Mathlib gap analysis is not the absence of or of — Mathlib has both, and LSeries.vonMangoldt is exactly the key theorem above — but the absence of a single module assembling the Hadamard product for , the partial-fraction expansion of over the critical zeros, and the von Mangoldt explicit formula for end to end, the chain that converts the logarithmic-derivative identity into the prime number theorem.
Advanced results Master
Theorem 1 (Hadamard product for the completed zeta). The completed zeta function is entire of order one [Davenport §12], hence admits a Hadamard factorisation $$ \xi(s) = e^{A + Bs} \prod_\rho \Big(1 - \frac{s}{\rho}\Big) e^{s/\rho}, $$ the product over the critical zeros , with constants and the zeros paired as to secure convergence. Because and has no zeros outside the critical strip (the elementary zeros of are cancelled by the poles of , the pole of at by the factor ), the zeros of are exactly the critical zeros of .
Theorem 2 (partial-fraction expansion of ). Taking the logarithmic derivative of the Hadamard product and of the definition of yields [Davenport §12] $$ \frac{\zeta'(s)}{\zeta(s)} = B - \frac{1}{s - 1} + \sum_\rho \Big(\frac{1}{s - \rho} + \frac{1}{\rho}\Big) - \frac{1}{2}\log\pi + \frac{1}{2}\frac{\Gamma'}{\Gamma}\Big(\frac{s}{2} + 1\Big). $$ This exhibits the entire pole structure: the pole at from , one pole at each critical zero , and the elementary-zero contributions hidden in the digamma term , which has poles at the elementary zeros . The convergence-enforcing terms are paired with .
Theorem 3 (von Mangoldt explicit formula). For not a prime power [von Mangoldt 1895],
$$
\psi(x) = x - \sum_\rho \frac{x^\rho}{\rho} - \log(2\pi) - \frac{1}{2}\log!\big(1 - x^{-2}\big),
$$
the sum over critical zeros taken in order of increasing . The proof applies Perron's formula of 21.11.04 to and shifts the contour left, collecting the residue at , the residues at the zeros, at , and the elementary-zero geometric series at . The main term is the prime number theorem; the zero-sum is the fluctuation.
Theorem 4 (zero-free region PNT with error). Combining the partial-fraction expansion with the de la Vallée Poussin zero-free region [Montgomery-Vaughan Ch. 6] bounds the truncated zero-sum, yielding $$ \psi(x) = x + O!\big(x \exp(-c'\sqrt{\log x})\big). $$ Equivalently . Under the Riemann hypothesis , the error sharpens to , the best possible.
Theorem 5 (the explicit formula is reciprocal). Weil's explicit formula generalises Theorem 3 to a duality between a sum over primes (weighted by against a test function ) and a sum over zeros (the same test function's Mellin transform evaluated at the ), with an archimedean term from the -factor [Davenport §17]. The von Mangoldt formula is the case where the test function recovers . This reciprocity — primes on one side, zeros on the other — is the structural template for the explicit formulas of all automorphic -functions.
Synthesis. The logarithmic derivative is the foundational reason the prime number theorem is a theorem of complex analysis rather than of combinatorics. The central insight is that one analytic identity, , converts the multiplicative data of the Euler product into the additive prime-power weight , and this is exactly the bridge from the elementary of 21.11.03 to the analytic : where Chebyshev squeezed between two multiples of using factorials, the contour integral of pins the constant to exactly by reading the residue at the pole . Putting these together, the explicit formula generalises the two-sided bound into an exact identity in which the zeros are dual to the primes, each zero an oscillating correction whose amplitude is governed by the zero-free region. The central insight recurs: the Hadamard product is dual to the Euler product — one factors over its zeros, the other factors over the primes — and the partial-fraction expansion of is the logarithmic-derivative shadow of both. The bridge is everywhere : Riemann posited it, von Mangoldt made it rigorous, and the modern theory of -functions is the systematic exploitation of the same identification of primes with zeros.
Full proof set Master
Proposition 1 (the von Mangoldt identity). For , .
Proof. This is the Key theorem; we record the proof compactly. For the Euler product gives , absolutely convergent. Differentiation, valid by local uniform convergence of (dominated by ), gives . Reindexing by collects the coefficient , so .
Proposition 2 (residues of ). The function is meromorphic on with a simple pole of residue at and a pole of residue at each zero of of multiplicity (elementary or critical); it is holomorphic elsewhere.
Proof. If near with and (with at the pole , at a zero of multiplicity , elsewhere), then with holomorphic at . Hence has residue and residue . At , gives residue for ; at a zero of multiplicity , gives residue . Away from zeros and the pole, and is holomorphic.
Proposition 3 ( is nonnegative and is increasing). for all , with exactly on prime powers; consequently is a nondecreasing step function jumping by at each prime power .
Proof. By definition when is a prime power and otherwise, so with support exactly the prime powers. The summatory function adds a nonnegative term as increases past each integer, hence is nondecreasing; it is constant between consecutive prime powers and jumps by at .
Proposition 4 (). The constant term at in the explicit formula equals .
Proof. From the functional equation of 06.01.16, take the logarithmic derivative:
$$
\frac{\zeta'(s)}{\zeta(s)} = \log 2 + \log\pi + \frac{\pi}{2}\cot!\Big(\frac{\pi s}{2}\Big) - \frac{\Gamma'(1 - s)}{\Gamma(1 - s)} - \frac{\zeta'(1 - s)}{\zeta(1 - s)}.
$$
Evaluate as . The cotangent term supplies the pole of paired against the from the Perron kernel; isolating the finite part, the regular terms give . Using and the Laurent data of at (residue , constant term , so a value cancelling the terms), the finite part collapses to . Thus the residue of at is .
Connections Master
The von Mangoldt function and the convolution identity are imported from
21.11.03, where the same drives the elementary factorial identity ; this unit is the analytic continuation of that story, replacing the factorial bookkeeping with the logarithmic derivative of , and Chebyshev's is sharpened here to .The Euler product, functional equation, and pole structure of used throughout are exactly those of
21.03.01and06.01.16; the logarithmic derivative reads the pole at as the main term and the critical zeros as the fluctuations, so the analytic facts about established there become arithmetic facts about primes here.The contour-integral mechanism that turns the identity into the explicit formula is Perron's formula and Mellin inversion of
21.11.04; the convergence and truncation control needed to shift the contour past relies on the Chebyshev-grade bound from21.11.03.The Hadamard product over the critical zeros is the entire-function factorisation theory of
06.01.16applied to the completed zeta ; the order-one growth of and the pairing make the zero-sum in the explicit formula conditionally convergent.
Historical & philosophical context Master
Bernhard Riemann's 1859 memoir Ueber die Anzahl der Primzahlen unter einer gegebenen Grösse [Riemann 1859] introduced the analytic continuation of , the product over its critical zeros, and an explicit formula expressing the prime-counting function as a main term plus a sum over the zeros. Riemann stated the formula and sketched its derivation but did not supply complete proofs of the analytic estimates it required; several of his assertions, including the Hadamard product for an order-one entire function, awaited the function theory developed in the following decades.
Hans von Mangoldt's 1895 paper in Crelle's journal [von Mangoldt 1895] gave the first rigorous proof of Riemann's explicit formula, recast in terms of the weighted count and the function that now bears his name. The reformulation is decisive: is the summatory function of , is the Dirichlet-series coefficient of , and the contour integral of produces as a sum of residues over the poles of . The prime number theorem followed in 1896, proved independently by Jacques Hadamard and Charles-Jean de la Vallée Poussin, each establishing the zero-free region and inverting the logarithmic derivative by a contour integral [Davenport §12]. Davenport's Multiplicative Number Theory and Edwards's Riemann's Zeta Function are the canonical modern expositions of this chain.
Bibliography Master
@article{riemann1859,
author = {Riemann, Bernhard},
title = {Ueber die Anzahl der Primzahlen unter einer gegebenen Gr\"{o}sse},
journal = {Monatsberichte der K\"{o}niglichen Preu\ss{}ischen Akademie der Wissenschaften zu Berlin},
pages = {671--680},
year = {1859}
}
@article{vonmangoldt1895,
author = {von Mangoldt, Hans},
title = {Zu Riemanns Abhandlung ``Ueber die Anzahl der Primzahlen unter einer gegebenen Gr\"{o}sse''},
journal = {Journal f\"{u}r die reine und angewandte Mathematik (Crelle)},
volume = {114},
pages = {255--305},
year = {1895}
}
@book{davenport2000,
author = {Davenport, Harold},
title = {Multiplicative Number Theory},
edition = {3},
series = {Graduate Texts in Mathematics},
volume = {74},
publisher = {Springer-Verlag},
year = {2000},
note = {Revised by H. L. Montgomery; \S12--17}
}
@book{edwards1974,
author = {Edwards, Harold M.},
title = {Riemann's Zeta Function},
publisher = {Academic Press},
year = {1974},
note = {Chapter 3: the logarithmic derivative and the explicit formula}
}
@book{montgomeryvaughan2007,
author = {Montgomery, Hugh L. and Vaughan, Robert C.},
title = {Multiplicative Number Theory I: Classical Theory},
series = {Cambridge Studies in Advanced Mathematics},
volume = {97},
publisher = {Cambridge University Press},
year = {2007}
}