Skip to content

Mertens' theorems

In this section we give explicit versions of Mertens' theorems:

  • Mertens' first theorem (von Mangoldt form): \(\sum_{n \leq x} \frac{\Lambda(n)}{n} = \log x + O(1)\).
  • Mertens' first theorem (prime form): \(\sum_{p \leq x} \frac{\log p}{p} = \log x + O(1)\).
  • Mertens' second theorem (von Mangoldt form): \(\sum_{n \leq x} \frac{\Lambda(n)}{n \log n} = \log \log x + \gamma + O(1/\log x)\).
  • Mertens' second theorem (prime form): \(\sum_{p \leq x} \frac{1}{p} = \log \log x + M + O(1/\log x)\), where \(M\) is the Meissel-Mertens constant.
  • Mertens' third theorem: \(\prod_{p \leq x} (1 - \frac{1}{p}) = e^{-\gamma}/\log x + O(1/\log^2 x)\).

We aim to upstreaming these results to Mathlib. In particular, the arguments here should be self-contained and written for efficiency, coherency, and clarity. As such, extensive use of AI tools is strongly discouraged in this section.

The arguments here are drawn from Leo Goldmakher's “A quick proof of Mertens' theorem” from https://web.williams.edu/Mathematics/lg5/mertens.pdf

The unfinished formalization of Mertens' theorems by Arend Mellendijk in https://github.com/FLDutchmann/Analytic/blob/main/Analytic/Mertens.lean may also be relevant here.

Partial sum of logarithm… to Integral form for second error…

Bound for second Mertens error… to Mertens' third theorem error…

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.