Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Dusart's explicit upper bound for ∑p≤x1/p\sum_{p\le x}1/p∑p≤x​1/p

Open
QRHLittlewood.dusart_reciprocal_primes

by @bwdaugherty · 1 vote · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

analytic-number-theorynumber-theory

Let γ\gammaγ be the Euler–Mascheroni constant and let

B=γ+∑p(log⁡(1−1p)+1p)B=\gamma+\sum_{p}\Big(\log\Big(1-\frac1p\Big)+\frac1p\Big)B=γ+p∑​(log(1−p1​)+p1​)

be Mertens' constant, the sum running over all primes. For every real x≥10372x\ge10372x≥10372,

∑p≤x1p−log⁡log⁡x−B ≤ 110log⁡2x+415log⁡3x.\sum_{p\le x}\frac1p-\log\log x-B\ \le\ \frac{1}{10\log^2x}+\frac{4}{15\log^3x}.p≤x∑​p1​−loglogx−B ≤ 10log2x1​+15log3x4​.

This is the explicit form of Mertens' second theorem used to bound smoothed sums over primes.

Status note (2026-10-17) The release Dusart v2.0.0, doi:10.5281/zenodo.23432990 proves this bound in Lean 4 from the Chebyshev estimate for t≥3584912846=⌊e22⌋t\ge3584912846=\lfloor e^{22}\rfloort≥3584912846=⌊e22⌋ alone (Dusart.dusart_reciprocal_primes_of_chebyshev_large).

Status note (2026-10-19) The release Dusart v3.0.0, doi:10.5281/zenodo.23463154 proves this bound in Lean 4 with a single published table row as the only hypothesis, ∣θ(t)−t∣<0.15952 t/log⁡2t|\theta(t)-t|<0.15952\,t/\log^2t∣θ(t)−t∣<0.15952t/log2t for t>5⋅106t>5\cdot10^6t>5⋅106 (Broadbent, Kadiri, Lumley, Ng and Wilk, Math. Comp. 90 (2021), Theorem 1 with k=2k=2k=2, Table 15, row log⁡X0=log⁡(5⋅106)\log X_0=\log(5\cdot10^6)logX0​=log(5⋅106)) (Dusart.dusart_reciprocal_primes_of_bklnw; axioms propext, Classical.choice, Quot.sound only). With that published theorem the bound holds unconditionally as mathematics; the row itself is not formalized, so on this platform the entry stays reduced to the Chebyshev estimate.

Preamble
import Mathlib.NumberTheory.Harmonic.EulerMascheroni
import Mathlib.NumberTheory.LSeries.DirichletContinuation

open Real
Formal statement
namespace QRHLittlewood

theorem dusart_reciprocal_primes (x : ℝ) (hx : 10372 ≤ x) :
    (∑ p ∈ Finset.filter Nat.Prime (Finset.range (⌊x⌋₊ + 1)), (1 : ℝ) / p) - Real.log (Real.log x) -
        (Real.eulerMascheroniConstant + ∑' p : Nat.Primes, (Real.log (1 - 1 / (p : ℝ)) + 1 / (p : ℝ))) ≤
      1 / (10 * Real.log x ^ 2) + 4 / (15 * Real.log x ^ 3) := by sorry

end QRHLittlewood
Source
P. Dusart, Estimates of some functions over primes without R.H., arXiv:1002.0442 (2010), Theorem 6.10 (upper bound).
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Statement. For every real number x≥10372x\ge 10372x≥10372,

∑p primep≤x1p  −  log⁡log⁡x  −  B  ≤  110(log⁡x)2+415(log⁡x)3,\sum_{\substack{p\ \text{prime}\\ p\le x}}\frac1p\;-\;\log\log x\;-\;B\;\le\;\frac{1}{10(\log x)^2}+\frac{4}{15(\log x)^3},p primep≤x​∑​p1​−loglogx−B≤10(logx)21​+15(logx)34​,

where log⁡\loglog is the natural logarithm and

B=γ+∑p prime(log⁡(1−1p)+1p),B=\gamma+\sum_{p\ \text{prime}}\Bigl(\log\Bigl(1-\frac1p\Bigr)+\frac1p\Bigr),B=γ+p prime∑​(log(1−p1​)+p1​),

with γ\gammaγ the Euler–Mascheroni constant.

Details.

  • The finite sum runs over primes ppp in {0,1,…,⌊x⌋}\{0,1,\dots,\lfloor x\rfloor\}{0,1,…,⌊x⌋}, i.e. exactly the primes p≤xp\le xp≤x (here ⌊x⌋≥10372\lfloor x\rfloor\ge 10372⌊x⌋≥10372 is the usual floor since x>0x>0x>0).
  • The infinite sum over all primes is an unconditional (summability-based) sum; in Mathlib such a sum is defined to be 000 if the family is not summable. The terms log⁡(1−1/p)+1/p\log(1-1/p)+1/plog(1−1/p)+1/p are negative and of size about −1/(2p2)-1/(2p^2)−1/(2p2), so this junk convention would only matter if the family failed to be summable.
  • For x≥10372x\ge 10372x≥10372, log⁡x>9\log x>9logx>9, so all logarithms and denominators are genuine (no junk values).
  • This is a one-sided bound: only an upper bound on ∑p≤x1/p−log⁡log⁡x−B\sum_{p\le x}1/p-\log\log x-B∑p≤x​1/p−loglogx−B is asserted; no lower bound is claimed. The difference may be negative.
  • No hypotheses other than x≥10372x\ge 10372x≥10372; xxx need not be an integer.
Human review
  • Endorsed by Shuze Chen · Oct 16, 2026

    Confirmed by the moderator at approval.

  • Endorsed by @bwdaugherty · Oct 16, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me