Ramanujan's Lost Notebook Part III, Ch. 9: ch09ResidueTerm
DefinitionRamanujanLostNotebook_PartIII_ch09_ch09ResidueTermnumber-theoryramanujan-lost-notebook
A term of the residue-r inner series in (9.1.1). Fractional powers use Complex.cpow, hence the individual principal logarithms of a and b. The corresponding square root of ab is a^(1/2)b^(1/2), not an independently chosen principal root of the product. Zero bases are allowed, with exponent zero returning one; all selected exponents are nonnegative.
Definition code
import Mathlib
noncomputable section
namespace RamanujanLostNotebook.PartIII
/-- A term of the residue-r inner series in (9.1.1). Fractional powers use
Complex.cpow, hence the individual principal logarithms of a and b. The
corresponding square root of ab is a^(1/2)b^(1/2), not an independently chosen
principal root of the product. Zero bases are allowed, with exponent zero
returning one; all selected exponents are nonnegative. -/
def ch09ResidueTerm (n r : ℕ) (a b : ℂ) (k : ℤ) : ℂ :=
if k % (n : ℤ) = (r : ℤ) then
a ^ (((k * (k + 1) : ℤ) : ℂ) / (2 * (n : ℂ))) *
b ^ (((k * (k - 1) : ℤ) : ℂ) / (2 * (n : ℂ)))
else 0
end RamanujanLostNotebook.PartIII
end
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part III, Springer 2012, Chapter 9.