The Dirichlet divisor sum is at most
ProvedDivisorSums.sum_card_divisors_leanalytic-number-theorydivisor-sumsnumber-theory
An explicit bound for the summatory divisor function.
For every ,
The classical Dirichlet asymptotic is , so the bound above has the correct main term and is explicit, valid for all with no implied constant.
The proof is the hyperbola-free counting argument: interchanging summation,
the last step by comparing the harmonic sum with .
On average, then, an integer up to has about divisors — in sharp contrast with the maximal order of , which is but far larger than infinitely often. Explicit bounds of this shape are what let a divisor factor be absorbed in a sum without invoking an asymptotic.
Formalization note. n.divisors.card is ; the sum runs over .
Preamble
import Mathlib
Formal statement
namespace DivisorSums
theorem sum_card_divisors_le (x : ℕ) (hx : 1 ≤ x) :
∑ n ∈ Finset.Icc 1 x, ((n.divisors.card : ℝ)) ≤ x * (1 + Real.log x) := by sorry
end DivisorSumsSource
Classical; Dirichlet's divisor problem, see Apostol, *Introduction to Analytic Number Theory*, §3.3. Lean proof extracted from `Salt/BV/` of the Salt project, https://github.com/jyh/salt (Apache-2.0, Jason Hickey).