Ramanujan's Lost Notebook Part IV, Ch. 11: primeTheta
DefinitionRamanujanLostNotebook_PartIV_ch11_primeThetanumber-theoryramanujan-lost-notebook
Chebyshev's function ϑ(x) = ∑_{p ≤ x} log p, the sum over primes p ≤ x
(zero for x < 2). It is the function called ϑ in Chapter 11; if the pinned Mathlib has
Chebyshev.theta, this is the same function, written out to avoid depending on that name.
Definition code
import Mathlib
namespace RamanujanLostNotebook.PartIV
/-- Chebyshev's function `ϑ(x) = ∑_{p ≤ x} log p`, the sum over primes `p ≤ x`
(zero for `x < 2`). It is the function called `ϑ` in Chapter 11; if the pinned Mathlib has
`Chebyshev.theta`, this is the same function, written out to avoid depending on that name. -/
noncomputable def primeTheta (x : ℝ) : ℝ :=
∑ p ∈ Finset.filter Nat.Prime (Finset.range (⌊x⌋₊ + 1)), Real.log (p : ℝ)
end RamanujanLostNotebook.PartIV
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part IV, Springer 2013, Chapter 11.