Ramanujan's Lost Notebook Part I, Ch. 7: ch07Chi3
DefinitionRamanujanLostNotebook_PartI_ch07_ch07Chi3number-theoryramanujan-lost-notebook
The quadratic odd character modulo 3: residues 0,1,2 have values 0,1,-1, respectively. Used in Entry 7.3.1; χ(0)=0.
Definition code
import Mathlib noncomputable section namespace RamanujanLostNotebook.PartI /-- The quadratic odd character modulo 3: residues 0,1,2 have values 0,1,-1, respectively. Used in Entry 7.3.1; χ(0)=0. -/ def ch07Chi3 (n : ℕ) : ℝ := if n % 3 = 0 then 0 else if n % 3 = 1 then 1 else -1 end RamanujanLostNotebook.PartI end
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part I, Springer 2005, Chapter 7.