as a von Mangoldt sum
ProvedChebyshevFunctions.sum_log_eq_sum_vonMangoldt_mul_divanalytic-number-theorynumber-theoryprime-numbers
Legendre's factorial identity.
For every ,
where is the von Mangoldt function.
The identity comes from — itself the statement that — summed over and with the order of summation exchanged: each contributes once for every multiple of up to , and there are exactly of those.
This is the starting point of Chebyshev's elementary theory of the distribution of primes. Combining it with Stirling's estimate and removing the floor functions yields , hence Mertens' theorems and the bounds — all without any complex analysis.
Formalization note. The sums run over Finset.Ioc 0 N, i.e. , avoiding
; N / d is natural division, so the cast to is the floor
.
Preamble
import Mathlib
Formal statement
namespace ChebyshevFunctions
open ArithmeticFunction in
theorem sum_log_eq_sum_vonMangoldt_mul_div (N : ℕ) :
∑ n ∈ Finset.Ioc 0 N, Real.log n
= ∑ d ∈ Finset.Ioc 0 N, vonMangoldt d * ((N / d : ℕ) : ℝ) := by sorry
end ChebyshevFunctionsSource
Classical; Legendre's identity, see Apostol, *Introduction to Analytic Number Theory*, §4.2, and Montgomery & Vaughan, §2.1. Lean proof extracted from `Salt/Maynard/Mertens.lean` of the Salt project, https://github.com/jyh/salt (Apache-2.0, Jason Hickey).