Ramanujan's Notebooks, shared: eisP
DefinitionRamanujanNotebooks_shared_eisPnumber-theoryramanujan-notebooks
Ramanujan's L = P(q) = 1 - 24 ∑_{k ≥ 1} k q^k / (1 - q^k) (Part II, p. 318; called
L in the notebooks and by Berndt, P in Ramanujan's published paper; Part III, p. 455),
written with k = m + 1. Domain: ‖q‖ < 1.
The argument is q: with q = e^{-2y} the series (1.1) of Part III, Chapter 21, without
its term -3/y, is eisP at e^{-2y} (stated with Real.exp).
Reference: 1 - 24q - 72q^2 - 96q^3 - 168q^4 - …, P(1/5) = -7.7849042257746685160…,
P(e^{-2π}) = 3/π.
Definition code
import Mathlib
noncomputable section
namespace RamanujanNotebooks
/-- Ramanujan's `L = P(q) = 1 - 24 ∑_{k ≥ 1} k q^k / (1 - q^k)` (Part II, p. 318; called
`L` in the notebooks and by Berndt, `P` in Ramanujan's published paper; Part III, p. 455),
written with `k = m + 1`. Domain: `‖q‖ < 1`.
The argument is `q`: with `q = e^{-2y}` the series (1.1) of Part III, Chapter 21, without
its term `-3/y`, is `eisP` at `e^{-2y}` (stated with `Real.exp`).
Reference: `1 - 24q - 72q^2 - 96q^3 - 168q^4 - …`, `P(1/5) = -7.7849042257746685160…`,
`P(e^{-2π}) = 3/π`. -/
def eisP (q : ℂ) : ℂ :=
1 - 24 * (∑' m : ℕ, ((m : ℂ) + 1) * q ^ (m + 1) / (1 - q ^ (m + 1)))
end RamanujanNotebooks
end
Source
Bruce C. Berndt, Ramanujan's Notebooks.