Ramanujan's Lost Notebook Part III, Ch. 3: ch3UnitInvTrunc
DefinitionRamanujanLostNotebook_PartIII_ch03_ch3UnitInvTruncnumber-theoryramanujan-lost-notebook
Sum_{j=0}^N(1-P)^j, representing 1/P through degree N when P(0)=1. Every use here has constant term one. Higher geometric terms have degree >N; there is no division in the coefficient ring and no assumption of an identity.
Definition code
import Mathlib
noncomputable section
namespace RamanujanLostNotebook.PartIII
/-- Sum_{j=0}^N(1-P)^j, representing 1/P through degree N when P(0)=1.
Every use here has constant term one. Higher geometric terms have degree >N;
there is no division in the coefficient ring and no assumption of an identity. -/
noncomputable def ch3UnitInvTrunc {R : Type*} [CommRing R]
(N : ℕ) (P : Polynomial R) : Polynomial R :=
∑ j ∈ Finset.range (N + 1), (1 - P) ^ j
end RamanujanLostNotebook.PartIII
end
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part III, Springer 2012, Chapter 3.