Ramanujan's Lost Notebook Part V, shared: thetaPhi
DefinitionRamanujanLostNotebook_PartV_shared_thetaPhinumber-theoryramanujan-lost-notebook
Ramanujan's φ(q) = f(q, q) = ∑_{n ∈ ℤ} q^{n^2} (the book defines it through
φ(-q), (2.3.1), p. 8, and (3.1.14), p. 18; φ(q) := f(q, q) on p. 88).
Domain: ‖q‖ < 1. There φ(-q) = (q; q)_∞ / (-q; q)_∞. Outside: 0.
Reference: 1 + 2q + 2q^4 + 2q^9 + …, φ(1/5) = 1.4032010240131072067….
Definition code
import Mathlib
noncomputable section
namespace RamanujanLostNotebook.PartV
/-- Ramanujan's `φ(q) = f(q, q) = ∑_{n ∈ ℤ} q^{n^2}` (the book defines it through
`φ(-q)`, (2.3.1), p. 8, and (3.1.14), p. 18; `φ(q) := f(q, q)` on p. 88).
Domain: `‖q‖ < 1`. There `φ(-q) = (q; q)_∞ / (-q; q)_∞`. Outside: `0`.
Reference: `1 + 2q + 2q^4 + 2q^9 + …`, `φ(1/5) = 1.4032010240131072067…`. -/
def thetaPhi (q : ℂ) : ℂ :=
∑' n : ℤ, q ^ (n.natAbs ^ 2)
end RamanujanLostNotebook.PartV
end
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part V, Springer 2018.