The von Mangoldt Function
The primes are stubborn. Counted raw — 2, 3, 5, 7, 11, \dots — they
resist every clean formula, and the counting function
\(\pi(x)\)
with its awkward x/\ln x asymptotic is genuinely painful to analyse. The
central trick of analytic number theory is to stop counting each prime as "1"
and instead give it exactly the right weight. That weight is the
von Mangoldt function \Lambda(n), and it turns the
chaotic primes into an object smooth enough to attack with complex analysis.
The pay-off is spectacular: with the correct weighting, the Prime Number Theorem sheds its ugly
skin and becomes the single cleanest statement in the subject —
\psi(x) \sim x. A staircase that hugs the diagonal line
y = x. Let's build the weight that makes that happen.
The definition
For a positive integer n,
\Lambda(n) = \begin{cases} \log p & \text{if } n = p^k \text{ for a prime } p \text{ and integer } k \ge 1,\\[2pt] 0 & \text{otherwise.}\end{cases}
In words: \Lambda(n) is \log p exactly when
n is a prime power — a prime, or a prime squared, cubed,
and so on — and it is 0 at every other number (including
1, and every integer with two or more distinct prime factors). Notice two
deliberate design choices that look strange at first and turn out to be exactly right:
- a prime is weighted by \log p, not by 1;
- prime powers p^k are switched on too, each still carrying \log p (the base prime's log, not \log p^k).
Both choices will pay for themselves within a page. Here is the function on the first twelve integers.
| n |
1 | 2 | 3 |
4 | 5 | 6 |
7 | 8 | 9 |
10 | 11 | 12 |
| \Lambda(n) |
0 | \log 2 | \log 3 |
\log 2 | \log 5 | 0 |
\log 7 | \log 2 | \log 3 |
0 | \log 11 | 0 |
Read it off: 4 = 2^2 and 8 = 2^3 both give
\log 2; 9 = 3^2 gives
\log 3; while 6 = 2\cdot 3 and
12 = 2^2\cdot 3 — having two different prime factors — are switched off.
Chebyshev's counting functions \psi and \theta
Now sum the weight. The second Chebyshev function
\psi(x) is the running total of \Lambda:
\psi(x) = \sum_{n \le x} \Lambda(n) = \sum_{p^k \le x} \log p .
The two forms are the same sum written two ways: the middle one runs over all integers (most terms
are zero), the right one runs only over prime powers (the terms that survive). Its plainer cousin,
the first Chebyshev function \theta(x), drops the higher
prime powers and keeps only the primes themselves:
\theta(x) = \sum_{p \le x} \log p = \log\!\Big(\textstyle\prod_{p \le x} p\Big) .
So \theta(x) is the logarithm of the product of all primes up to
x (that product is the "primorial"). And
\psi is \theta plus the small extra weight
contributed by squares, cubes and higher powers of primes.
Worked example — compute \psi(10) by hand. From the
table, the non-zero terms up to 10 come from
2, 3, 4, 5, 7, 8, 9:
\psi(10) = \underbrace{\log 2}_{2} + \underbrace{\log 3}_{3} + \underbrace{\log 2}_{4} + \underbrace{\log 5}_{5} + \underbrace{\log 7}_{7} + \underbrace{\log 2}_{8} + \underbrace{\log 3}_{9} = 3\log 2 + 2\log 3 + \log 5 + \log 7 .
Numerically that is \psi(10) \approx 7.83 — already close to
x = 10. Meanwhile
\theta(10) = \log 2 + \log 3 + \log 5 + \log 7 \approx 5.35, so the
prime-power surplus is \psi(10) - \theta(10) = 2\log 2 + \log 3 \approx 2.48
(the contributions of 4, 8, 9).
Seeing it: a staircase that hugs the diagonal
Here is \psi(x) plotted against the line y = x.
It jumps by \log p at each prime power and is flat in between — a jagged
staircase. Yet it never strays far from the diagonal, and the higher you climb the tighter it clings.
That closeness is the Prime Number Theorem in its cleanest dress.
Compare this with the \pi(x) versus x/\ln x
picture: there the smooth companion is a curved, log-scaled thing. Here the companion is simply
y = x — a straight line at 45^\circ. The
\log p weighting has straightened the whole problem out.
The key identity: \sum_{d\mid n}\Lambda(d) = \log n
Why \log p, and why include the prime powers? Because of one beautiful
identity that ties \Lambda straight back to the logarithm.
For every positive integer n,
\sum_{d \mid n} \Lambda(d) = \log n .
The proof is a one-liner from unique factorisation. Write
n = p_1^{a_1}\cdots p_r^{a_r}. The only divisors
d of n with
\Lambda(d) \ne 0 are the prime powers
p_i^{j} with 1 \le j \le a_i, and each
contributes \log p_i. Prime p_i therefore
contributes a_i copies of \log p_i, and
\sum_{d \mid n}\Lambda(d) = \sum_{i=1}^{r} a_i \log p_i = \log\!\big(p_1^{a_1}\cdots p_r^{a_r}\big) = \log n .
Worked example — verify at n = 12. The divisors of
12 are 1, 2, 3, 4, 6, 12. Only
2, 3, 4 are prime powers, so
\sum_{d \mid 12}\Lambda(d) = \Lambda(2) + \Lambda(3) + \Lambda(4) = \log 2 + \log 3 + \log 2 = \log(4\cdot 3) = \log 12 .\ \checkmark
This is exactly why the two odd design choices were right. Weighting by
\log p (not 1) is what lets the sum rebuild
\log n; and keeping the higher prime powers is what supplies the
right number of copies — a_i of them — so the exponents in
n = \prod p_i^{a_i} are recovered perfectly.
Inverting it: \Lambda from Möbius
The identity \sum_{d\mid n}\Lambda(d) = \log n says
\log is the "divisor sum" of \Lambda. Run
Möbius inversion
and you can solve for \Lambda itself, in terms of the
Möbius function
\mu:
\Lambda(n) = \sum_{d \mid n} \mu(d)\,\log\!\frac{n}{d} = \log n \sum_{d\mid n}\mu(d) - \sum_{d\mid n}\mu(d)\log d = -\sum_{d \mid n} \mu(d)\,\log d .
The middle step splits \log(n/d) = \log n - \log d. The first piece dies
because \sum_{d\mid n}\mu(d) = 0 for every
n > 1 (and at n = 1 both sides are
0), leaving the tidy closed form
\Lambda(n) = -\sum_{d\mid n}\mu(d)\log d. So the von Mangoldt function is
not an ad-hoc invention — it is precisely the Möbius transform of the logarithm.
The generating identity: -\zeta'(s)/\zeta(s)
The divisor-sum identity has a twin in the world of
Dirichlet series,
and this is the doorway through which complex analysis enters. Start from the Euler product
\zeta(s) = \prod_p (1 - p^{-s})^{-1}, take a logarithm, then differentiate
in s:
\log \zeta(s) = -\sum_p \log\!\big(1 - p^{-s}\big), \qquad -\frac{\zeta'(s)}{\zeta(s)} = \sum_p \frac{(\log p)\,p^{-s}}{1 - p^{-s}} = \sum_p \sum_{k \ge 1} (\log p)\, p^{-ks} .
That last double sum runs over every prime p and every power
k \ge 1, weighting p^{-ks} = (p^k)^{-s} by
\log p — which is exactly \Lambda(p^k). Collect
the terms by n = p^k and you get the identity that powers the rest of the
course:
For \Re(s) > 1,
-\frac{\zeta'(s)}{\zeta(s)} = \sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{s}} .
This is the Dirichlet series whose coefficients are the von Mangoldt weights. Because
\psi(x) = \sum_{n\le x}\Lambda(n) is the partial-sum (summatory) function
of those coefficients, a contour integral of -\zeta'(s)/\zeta(s) — Perron's
formula — converts analytic facts about \zeta into arithmetic facts about
\psi(x). The zeros of \zeta
become the poles of -\zeta'/\zeta, and each one leaves a
fingerprint on the fluctuations of \psi(x) around
x. That single bridge — arithmetic on the left, analysis on the right — is
the reason \Lambda exists.
Why this is the "right" smoothing
Three counting functions all encode the Prime Number Theorem, and they are equivalent — but their
asymptotics are ranked by beauty:
\pi(x) \sim \frac{x}{\ln x}, \qquad \theta(x) \sim x, \qquad \psi(x) \sim x .
The \log p weighting is a form of partial summation done in advance:
it pre-multiplies each prime by the very \log that clutters
\pi(x)'s asymptotic, so the mess cancels and you land on the pristine
\sim x. And of the two clean ones, \psi beats
\theta: including prime powers is exactly what makes
-\zeta'(s)/\zeta(s) — with its perfect Euler-product structure — the
generating series, so \psi(x) is the object the analysis actually delivers.
You prove \psi(x)\sim x first, then trade back down to
\theta and \pi.
A tempting mistake is to treat \psi(x) and
\theta(x) as interchangeable because "both are \sim x."
They differ — by the prime-power terms — and you must keep track of the gap. Fortunately the gap is
small. The surplus is
\psi(x) - \theta(x) = \sum_{k \ge 2}\ \theta\!\big(x^{1/k}\big) = \theta(\sqrt{x}) + \theta(\sqrt[3]{x}) + \cdots = O\!\big(\sqrt{x}\,\log^2 x\big).
The squares of primes contribute a \theta(\sqrt x)\approx\sqrt x, the cubes
a still-smaller \theta(x^{1/3}), and so on — a fast-shrinking tail that
stops once x^{1/k} < 2. Since \sqrt{x}\,\log^2 x
is dwarfed by the main term x, the two functions share the same leading
asymptotic. So: interchangeable to leading order, absolutely not equal — and in the
error term, that \sqrt x difference is very much alive.
Yes — and it is charming. Group \psi(x) by prime: prime
p contributes \log p once for each power
p^k \le x, i.e. \lfloor \log_p x\rfloor times.
That is exactly the exponent of p in the least common multiple of
1, 2, \dots, \lfloor x\rfloor. Hence
\psi(x) = \log\,\operatorname{lcm}(1, 2, \dots, \lfloor x\rfloor).
Check it at x = 10:
\operatorname{lcm}(1,\dots,10) = 2520, and
\log 2520 \approx 7.83 — precisely the
\psi(10) we computed by hand. So "the primes weighted by their logs"
secretly measures how fast the lowest common multiple of the first
n integers grows, and \psi(x)\sim x says that
lcm grows like e^{x}.
What to carry forward
You now hold the object that the rest of prime-estimate theory is written in. Three things to keep:
\Lambda(n) = \log p on prime powers and 0
elsewhere; the summatory function \psi(x) = \sum_{n\le x}\Lambda(n), a
staircase asymptotic to the clean line x; and the bridge
-\zeta'(s)/\zeta(s) = \sum \Lambda(n)\,n^{-s} that will let the zeros of
\zeta speak directly about the primes. Everything downstream — Chebyshev's
bounds, Mertens' theorems, and the analytic proof of the Prime Number Theorem — is a conversation
about \psi(x).