
Sum of Reciprocals of Primes Diverges: Euler’s Surprising Trick Explained
Table of Contents
TL;DR
- Euler proved that the sum of all prime reciprocals diverges, even though it grows incredibly slowly.
- The proof uses an infinite product over primes and logarithms, turning a multiplication into a summation.
- The key insight: the logarithm of the product behaves like a telescoping sum that captures every prime exactly once.
- The divergence is quantified as ∑_{p≤x} 1/p ≈ log log x + M, where M is the Mertens constant (~0.2615).
- This result underpins modern analytic number theory and explains why primes are “rare” yet plentiful enough to fill the integers.
Why this matters
I remember the first time I stared at a calculator that kept adding 1/2 + 1/3 + 1/5 + 1/7 + … and wondered: “Does this ever stop?” For a student, the answer isn’t obvious. The harmonic series 1 + 1/2 + 1/3 + … is the classic example of divergence, but when you take only the primes the divergence is so subtle that even seasoned mathematicians were surprised.
Euler’s 1737 proof shows that the primes, though sparse, are abundant enough to make the series diverge. This has practical consequences: it tells us that primes are not too rare, which underpins many cryptographic systems, and it provides a cornerstone for the Riemann Hypothesis and the distribution of primes.
Core concepts
1. From integers to primes: the Euler product
The starting point is Euler’s observation that every positive integer has a unique factorisation into primes. This uniqueness translates into an infinite product:
ζ(s)=∑{n=1}^{∞} 1/n^s = ∏{p prime} 1/(1-p^{-s}).
which is the Euler product formula for the Riemann zeta function Wikipedia — Riemann zeta function (2024).
When we let s = 1, the left side becomes the harmonic series, which is known to diverge, and the right side becomes
∏_{p} p/(p-1).
If the product on the right were convergent, the harmonic series would be convergent—a contradiction. Hence, the product diverges, and so do the prime reciprocals.
Analogy: Think of a factory that builds every integer by combining prime “parts.” If you count how many parts of each type you need, you’re essentially summing the reciprocals of primes.
2. Logarithms turn products into sums
Euler’s next trick was to take the natural logarithm of the infinite product:
log(∏{p} p/(p-1)) = ∑{p} log(p/(p-1)).
The logarithm of a fraction p/(p-1) can be expanded via the Taylor series of log(1+x) with x = 1/(p-1):
log(p/(p-1)) = 1/p + 1/(2p^2) + 1/(3p^3) + …
Now we have an infinite sum of prime powers. The first term is 1/p, the series we care about. The rest of the terms involve higher powers of primes.
3. Higher-power terms converge
Because p^k ≥ p^2 for k ≥ 2, each tail of the series
∑_{p} 1/(k p^k)
is dominated by the convergent sum ∑{p} 1/p^2. The Basel problem (the sum of 1/n^2) converges to π^2/6 Wikipedia — Basel problem (2024), and primes are a subset of all integers, so ∑{p} 1/p^2 converges as well Wikipedia — Prime zeta function (2024). Hence, the whole tail is bounded by a constant C < 1 Wikipedia — Mertens constant (2024).
Takeaway: The messy higher-power part of the series is harmless; it just contributes a finite bump.
4. The divergent part
Subtracting the bounded constant C from the logarithm isolates the divergent component:
log(∏{p} p/(p-1)) - C ≈ ∑{p} 1/p.
But the left side grows like log log N when we stop at the largest prime p ≤ N. In fact, Euler proved that
∑_{p≤N} 1/p = log log N + M + o(1),
where M is the Mertens constant (~0.2615) Wikipedia — Mertens constant (2024). The double logarithm explains why the divergence is extremely slow: to add 1 to the sum, you need to go to an astronomically large prime.
5. Concrete numbers
- The partial sum up to the 10⁸-th prime (≈ 1.3 × 10⁹) is about 5.2, still far from diverging.
- If you sum all prime reciprocals up to the number of atoms in the observable universe (~10⁸⁰), the value is still < 6 Wikipedia — Prime harmonic series (2024).
This illustrates the log-log growth: you need about e¹⁶ ≈ 9 × 10⁶ times more primes to increase the sum by one.
How to apply it
I usually start with the product formula and work backwards:
Write the Euler product.
∑ 1/n^s = ∏ 1/(1-p^{-s}).Take s = 1 and log both sides.
You’ll see a sum of logs of prime factors.Expand each log via Taylor.
Keep only the 1/p term; bound the rest by a known convergent series.Subtract the bound.
What remains is an inequality that shows divergence.Translate to an asymptotic estimate.
Use known limits (Mertens constant) to get the log log N behavior.
When you write this down on paper, you’ll notice the proof feels like a clever algebraic trick: Euler “factored” the harmonic series in a new way and used the logarithm to untangle the factorial structure.
Pitfalls & edge cases
| Claim | Why it can trip you up | How to avoid it |
|---|---|---|
| “The series diverges to infinity.” | People think divergence means a huge number. It’s slow—log log N grows so slowly that even a prime count of 10⁸⁰ gives < 6. | Use the asymptotic formula ∑_{p≤N} 1/p ≈ log log N + M. |
| “You can rearrange terms arbitrarily.” | Rearranging divergent series can change the result. Euler’s rearrangement is safe because each rearranged series is still absolutely convergent in the tail. | Keep the tail bound explicit (≤ C). |
| “The constant C is exactly 1.” | C is smaller than 1, roughly 0.2615. Saying it equals 1 overestimates the error. | Cite Mertens constant. |
| “The proof works for all s. | The Euler product only converges for Re(s) > 1. At s = 1 it diverges, which is the trick we use. | Stick to s = 1 for this proof. |
| “Prime squares already diverge.” | Actually, ∑ 1/p^2 converges. The convergence follows from the Basel problem. | Cite Basel problem and prime zeta function. |
Quick FAQ
| Question | Answer |
|---|---|
| Why does Euler’s product formula connect primes and the zeta function? | Because each integer’s unique prime factorization translates the sum of 1/n^s into a product over primes, encoding multiplicative structure. |
| How do we interpret the log(log N) growth of the prime reciprocal sum? | The logarithm turns the product into a sum; the outer logarithm then yields a double logarithm, indicating very slow divergence. |
| Why is the sum of reciprocals of prime squares finite? | 1/p^2 is dominated by the convergent Basel series ∑ 1/n^2; primes are fewer than all integers. |
| What is the constant C mentioned in Euler’s proof? | C is the sum of the tail ∑_{p} (1/(2p^2)+1/(3p^3)+…); it converges to the Mertens constant M ≈ 0.2615. |
| How does the tail of the series remain bounded by 1 after grouping? | Each term in the tail is a positive series bounded by a convergent geometric series; summing over all primes yields a total < 1. |
| Why is the divergence of the prime reciprocal series considered “slow”? | Because ∑_{p≤x} 1/p grows like log log x; to add 1 you need to increase x by an exponential factor. |
| How does Euler’s approach relate to modern analytic number theory? | It’s the foundation for the study of ζ(s) and the distribution of primes; the same machinery underlies the Riemann Hypothesis. |
Conclusion
The sum of reciprocals of primes diverges, but it does so in a whisper: the partial sum climbs only logarithmically in the logarithm of the largest prime you include. Euler’s clever manipulation of an infinite product and a logarithm turns an apparently innocuous series into a powerful tool for understanding primes.
Who should read this?
- Undergraduates who want a concrete proof of an analytic fact.
- Math teachers looking for a vivid narrative to share in class.
- Enthusiasts who love the elegance of Euler’s methods.
Who should skip it?
- Anyone looking for a quick cheat sheet on prime counts; the math here is a bit heavy.
My next project is to explore how Euler’s method extends to other divergent series, like ∑ 1/(p·log p), but that’s a story for another day.
References
- Wikipedia — Prime harmonic series (2024) — https://en.wikipedia.org/wiki/Prime_harmonic_series
- Wikipedia — Riemann zeta function (2024) — https://en.wikipedia.org/wiki/Riemann_zeta_function
- Wikipedia — Prime zeta function (2024) — https://en.wikipedia.org/wiki/Prime_zeta_function
- Wikipedia — Mertens constant (2024) — https://en.wikipedia.org/wiki/Mertens_constant
- Wikipedia — Basel problem (2024) — https://en.wikipedia.org/wiki/Basel_problem
Hero image prompt
Chalkboard with handwritten notes of Euler’s product formula and the prime harmonic series, with a sketch of prime numbers and a slowly rising logarithmic curve, in a university classroom, warm lighting.