Key idea of this section
Hₙ = 1 + 1/2 + … + 1/n = ln n + γ + 1/(2n) − 1/(12n²) + O(1/n⁴) γ = 0.5772156649… (Euler–Mascheroni constant) ∑p ≤ x 1/p = ln ln x + M + o(1), M = 0.2614972128…
The constant γ
The harmonic numbers Hₙ are Riemann sums for ∫ dt/t, so Hₙ ≈ ln n. The error converges.
Theorem 9.1. The sequence aₙ = Hₙ − ln n is strictly decreasing, the sequence bₙ = Hₙ − ln(n + 1) is strictly increasing, and both converge to a common limit γ with 1 − ln 2 < γ < 1.
Proof. By Proposition 1.6, 1/(n + 1) < ln(1 + 1/n) < 1/n. Hence aₙ − aₙ₊₁ = ln(1 + 1/n) − 1/(n + 1) > 0 and bₙ₊₁ − bₙ = 1/(n + 1) − ln(1 + 1/(n + 1)) > 0. Since bₙ < aₙ, we have b₁ < bₙ < aₙ < a₁, so both monotone sequences are bounded and converge. Their difference aₙ − bₙ = ln(1 + 1/n) tends to 0. The bounds b₁ = 1 − ln 2 ≈ 0.3069 and a₁ = 1 give the stated inequalities. ∎
Euler computed γ to 16 decimal places in 1781 using the Euler–Maclaurin formula; Mascheroni's 1790 computation contained errors in later digits. Today γ = 0.57721566490153286… is known to hundreds of billions of digits, yet it is not known whether γ is irrational. Continued-fraction computations show that if γ = p/q in lowest terms, then q > 10²⁴⁰⁰⁰⁰.
Refinement
The Euler–Maclaurin summation formula applied to f(t) = 1/t gives the full asymptotic expansion
Hₙ = ln n + γ + 1/(2n) − ∑k≥1 B₂ₖ/(2k n²ᵏ) = ln n + γ + 1/(2n) − 1/(12n²) + 1/(120n⁴) − … ,
where B₂ = 1/6, B₄ = −1/30, … are Bernoulli numbers. The series diverges, but truncation is extremely accurate. For n = 10, H₁₀ = 7381/2520 = 2.9289683, while ln 10 + γ + 1/20 − 1/1200 = 2.9289674; the difference, 8.3·10⁻⁷, is the next term 1/(120·10⁴). A simple consequence is the bracket 1/(2n + 2) < Hₙ − ln n − γ < 1/(2n), which for n = 10 reads 0.04545 < 0.04917 < 0.05.
Integral representations
Writing Hₙ − ln n = ∑k≤n 1/k − ∫₁ⁿ dt/t and letting n → ∞ gives:
γ = ∫₁∞ (1/⌊t⌋ − 1/t) dt = 1 − ∫₁∞ {t}/t² dt,
where {t} = t − ⌊t⌋ is the fractional part. Through the digamma function of Lesson 6, γ = −ψ(1) = −Γ′(1), and differentiating Γ(s) = ∫₀∞ tˢ⁻¹e⁻ᵗ dt at s = 1 gives γ = −∫₀∞ e⁻ᵗ ln t dt. Mertens' third theorem, below, shows that γ also controls the density of integers free of small prime factors.
Euler's proof that ∑ 1/p diverges
Theorem 9.2 (Euler, 1737). ∑p prime 1/p diverges. More precisely ∑p ≤ N 1/p > ln ln(N + 1) − 1/2 for N ≥ 2.
Proof. Every integer n ≤ N is a product of primes p ≤ N. Expanding each factor of the finite product ∏p≤N (1 − 1/p)⁻¹ = ∏p≤N (1 + 1/p + 1/p² + …) and using unique factorisation, every 1/n with n ≤ N appears in the expansion, so
∏p≤N (1 − 1/p)⁻¹ ≥ ∑n≤N 1/n ≥ ln(N + 1),
by Exercise (a) of Lesson 4. Taking logarithms, ∑p≤N −ln(1 − 1/p) ≥ ln ln(N + 1). For 0 ≤ x ≤ 1/2, −ln(1 − x) = x + x²/2 + x³/3 + … ≤ x + (x²/2)(1 + x + x² + …) = x + x²/(2(1 − x)) ≤ x + x². Therefore ∑p≤N 1/p ≥ ln ln(N + 1) − ∑p 1/p². Finally ∑p 1/p² ≤ 1/4 + ∑odd m≥3 1/m² = 1/4 + (π²/8 − 1) < 0.49 < 1/2. ∎
The divergence of ∑ 1/p is a quantitative form of Euclid's theorem: there are not only infinitely many primes, but enough of them that their reciprocals diverge, unlike the squares, whose reciprocals sum to π²/6.
Mertens' theorems
Theorem 9.3 (Mertens, 1874). As x → ∞,
∑p≤x (ln p)/p = ln x + O(1), ∑p≤x 1/p = ln ln x + M + O(1/ln x), ∏p≤x (1 − 1/p) = e⁻ᵞ/ln x · (1 + O(1/ln x)).
The first follows from Legendre's formula for the power of p dividing n!, combined with Stirling's estimate ln n! = n ln n + O(n) and Chebyshev's upper bound θ(x) = O(x) from Lesson 10; the second follows from the first by partial summation, and the third, whose constant e⁻ᵞ ≈ 0.561459 is surprisingly hard to identify, from the second together with an analysis of the Euler product of ζ(s) near s = 1. Numerically, for x = 10⁶, ∑p≤x 1/p = 2.887328, while ln ln 10⁶ + M = 2.887289, and ln(10⁶)·∏p≤10⁶(1 − 1/p) = 0.561438.
Dirichlet's divisor problem
Logarithms and γ appear together again in the average order of the divisor function d(n), the number of divisors of n. Counting lattice points under the hyperbola xy = x₀ by Dirichlet's hyperbola method gives
∑n≤x d(n) = x ln x + (2γ − 1)x + O(√x).
So a typical integer up to x has about ln x divisors, although the maximal order of d(n) is much larger, exp((ln 2 + o(1)) ln n / ln ln n) (Wigert). The optimal exponent θ in the error term O(xθ) is unknown; it is at least 1/4 (Hardy, 1916) and at most 131/416 ≈ 0.3149 (Huxley, 2003), with small later improvements.
Exercise
- (a)Using Hₙ ≈ ln n + γ + 1/(2n), estimate the least n with Hₙ > 10.
- (b)Prove that ∑n≥1 (1/n − ln(1 + 1/n)) = γ.
- (c)Show that ∏p≤x (1 − 1/p)⁻¹ → ∞ and use Mertens' third theorem to estimate it at x = 10⁶.
Show solution
Answers: (a) Ignoring 1/(2n), we need ln n > 10 − γ = 9.4227843, so n > e9.4227843 ≈ 12366.97. Including 1/(2n) ≈ 4.0·10⁻⁵ lowers the threshold for ln n by that amount, giving n > 12366.97·e−0.00004 ≈ 12366.47. The least such n is 12367 (indeed H₁₂₃₆₆ ≈ 9.99997 and H₁₂₃₆₇ ≈ 10.00004). (b) The N-th partial sum is HN − ∑n≤N ln((n + 1)/n) = HN − ln(N + 1) = bN → γ. (c) By Euler's argument it is at least ln(x + 1) → ∞. Mertens gives about eᵞ ln 10⁶ = 1.781072 × 13.815511 ≈ 24.61.