Rosser–Schoenfeld's pointwise totient bound (Theorem 15)
OpenTaoFivePrimes.rosser_schoenfeld_totient_pointwiseby andreaskapfer · 1 vote · Sep 17, 2026 · Mathlib 0df444a (Lean v4.33.1)
additive-number-theorynumber-theoryprime-pairssieve-methodstao-five-primes
Let φ denote Euler's totient function and γ the Euler–Mascheroni constant. For every integer n≥3,
φ(n)n<eγloglogn+loglogn2.50637.
This is Theorem 15 of Rosser and Schoenfeld (1962). The theorem is stated there in two branches: for all n≥3 one has φ(n)n<eγloglogn+2loglogn5 (their equation (3.41)), with the single exceptional integer n=223092870=2⋅3⋅5⋅7⋅11⋅13⋅17⋅19⋅23, for which the sharper bound φ(n)n<eγloglogn+loglogn2.50637 holds (their equation (3.42)). Since 5/2=2.5<2.50637, the single constant 2.50637 is valid uniformly for all n≥3, which is the form stated here.
The bound is the pointwise input in Tao's proof of Proposition 4.10 (arXiv:1201.6656), where it is applied to 2n for odd n and then uniformized in the parameter H≥102.
Formalization note: Nat.totient is Mathlib's totient function, coerced to R; Real.eulerMascheroniConstant is γ; Real.log (Real.log (n : \mathbb{R})) is the real logarithm of logn.
Preamble
import Mathlib.Data.Nat.Totient
import Mathlib.NumberTheory.Harmonic.EulerMascheroni
Formal statement
namespace TaoFivePrimes
theorem rosser_schoenfeld_totient_pointwise (n : ℕ) (hn : 3 ≤ n) :
(n : ℝ) / Nat.totient n <
Real.exp Real.eulerMascheroniConstant * Real.log (Real.log (n : ℝ)) +
2.50637 / Real.log (Real.log (n : ℝ)) := by sorry
end TaoFivePrimesSource
J.B. Rosser, L. Schoenfeld, *Approximate formulas for some functions of prime numbers*, Illinois Journal of Mathematics 6 (1962), 64–94, https://projecteuclid.org/journals/illinois-journal-of-mathematics/volume-6/issue-1/Approximate-formulas-for-some-functions-of-prime-numbers/10.1215/ijm/1255631807.full, Theorem 15, p. 72, eqs. (3.41)–(3.42); proof in §9, pp. 88–89; used in T. Tao, *Every odd number greater than 1 is the sum of at most five primes*, arXiv:1201.6656, https://arxiv.org/abs/1201.6656, proof of Proposition 4.10.
View graph