Ramanujan's Lost Notebook Part I, Ch. 14: ch14Chi3
DefinitionRamanujanLostNotebook_PartI_ch14_ch14Chi3number-theoryramanujan-lost-notebook
The real quadratic character modulo 3: 0, 1, −1 on residues 0, 1, 2. This is the Legendre symbol in (14.3.1), printed p.318.
Definition code
import Mathlib noncomputable section namespace RamanujanLostNotebook.PartI /-- The real quadratic character modulo 3: 0, 1, −1 on residues 0, 1, 2. This is the Legendre symbol in (14.3.1), printed p.318. -/ def ch14Chi3 (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 14.