Mertens' theorems

DefinitionThe constant in Mertens' first theorem#✓fully proved

With \(p\) ranging over the primes and \(\log\) the natural logarithm, this is the real number

\[M = \lim_{n \to \infty} \Bigl(\sum_{p \le n} \frac{\log p}{p} - \log n\Bigr),\]

the limit taken over natural numbers \(n\).

noncomputable def mertensConstant : ℝ :=
  Filter.limUnder Filter.atTop (fun n : ℕ =>
    (∑ p ∈ Finset.filter Nat.Prime (Finset.range (n + 1)),
      Real.log p / (p : ℝ)) - Real.log n)
Used by 2

TheoremDusart's explicit Mertens first theorem#●ready to prove

Let \(p\) range over the primes, let \(\log\) be the natural logarithm, and let \(M = \lim_{n \to \infty} \bigl(\sum_{p \le n} \frac{\log p}{p} - \log n\bigr)\) be the constant in Mertens' first theorem. For every real number \(x \ge 912560\) there is a real number \(E\) with \(|E| \le \frac{0.3}{(\log x)^2}\) such that

\[\sum_{p \le x} \frac{\log p}{p} = \log x + M + E.\]
theorem_wanted dusart_log_prime_sum (x : ℝ) (hx : 912560 ≤ x) :
    ∃ E, ((∑ p ∈ Finset.filter Nat.Prime (Finset.range (⌊x⌋₊ + 1)),
        Real.log p / (p : ℝ))
      = Real.log x + mertensConstant + E
      ∧ |E| ≤ 0.3 / (Real.log x) ^ 2)
Sources
Uses 1

DefinitionThe Meissel–Mertens constant#✓fully proved

With \(p\) ranging over the primes and \(\log\) the natural logarithm, the Meissel–Mertens constant is the real number

\[B = \lim_{n \to \infty} \Bigl(\sum_{p \le n} \frac{1}{p} - \log \log n\Bigr),\]

the limit taken over natural numbers \(n\). Numerically, \(B \approx 0.2614972128\).

noncomputable def meisselMertensConstant : ℝ :=
  Filter.limUnder Filter.atTop (fun n : ℕ =>
    (∑ p ∈ Finset.filter Nat.Prime (Finset.range (n + 1)),
      1 / (p : ℝ)) - Real.log (Real.log n))
Used by 13

TheoremDusart's explicit Mertens second theorem#●ready to prove

Let \(p\) range over the primes, let \(\log\) be the natural logarithm, and let \(B = \lim_{n \to \infty} \bigl(\sum_{p \le n} \frac{1}{p} - \log \log n\bigr)\) be the Meissel–Mertens constant. For every real number \(x \ge 2278383\) there is a real number \(E\) with \(|E| \le \frac{0.2}{(\log x)^3}\) such that

\[\sum_{p \le x} \frac{1}{p} = \log \log x + B + E.\]
theorem_wanted dusart_reciprocal_prime_sum (x : ℝ) (hx : 2278383 ≤ x) :
    ∃ E, ((∑ p ∈ Finset.filter Nat.Prime (Finset.range (⌊x⌋₊ + 1)),
        1 / (p : ℝ))
      = Real.log (Real.log x) + meisselMertensConstant + E
      ∧ |E| ≤ 0.2 / (Real.log x) ^ 3)
Sources
Uses 1
2 fully proved2 ready to prove

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.