Mertens' first theorem, with explicit constant
ProvedMertensTheorems.sum_log_div_prime_leMertens' first theorem, in explicit upper-bound form.
For every ,
the sum running over primes .
The main term is sharp: Mertens proved that , so the difference stays bounded, and this statement pins the upper side with the explicit constant rather than an unspecified .
The estimate is the first of Mertens' three theorems and the elementary gateway to the others: partial summation converts it into and then into . It already encodes the correct density of the primes in an averaged sense — enough for Chebyshev-type bounds — without requiring the prime number theorem.
The proof is elementary: one bounds using together with Stirling's estimate, and then discards the contribution of the higher prime powers, which converges. The constant enters through the standard bound on the central binomial coefficient.
Formalization note. The sum is over (Finset.range (N+1)).filter Nat.Prime, i.e. primes
, with and the division taken in .
import Mathlib
namespace MertensTheorems
theorem sum_log_div_prime_le {N : ℕ} (hN : 1 ≤ N) :
∑ p ∈ (Finset.range (N + 1)).filter Nat.Prime, Real.log p / p
≤ Real.log N + (Real.log 4 + 4) := by sorry
end MertensTheorems