Ramanujan's Lost Notebook Part III, Ch. 6: ch6EulerPower
DefinitionRamanujanLostNotebook_PartIII_ch06_ch6EulerPowernumber-theoryramanujan-lost-notebook
Polynomial equal through degree N to ∏_{k≥1}(1-X^k)^r, for integer r. For r<0, the finite binomial factors are truncated after j=N; every omitted term has degree greater than N. This is an exact coefficient construction, not an analytic approximation or a convergence assumption.
Definition code
import Mathlib
noncomputable section
namespace RamanujanLostNotebook.PartIII
/-- Polynomial equal through degree N to ∏_{k≥1}(1-X^k)^r, for integer r.
For r<0, the finite binomial factors are truncated after j=N; every omitted
term has degree greater than N. This is an exact coefficient construction,
not an analytic approximation or a convergence assumption. -/
noncomputable def ch6EulerPower (r : ℤ) (N : ℕ) : Polynomial ℤ :=
∏ k ∈ Finset.Icc 1 N,
if 0 ≤ r then (1 - Polynomial.X ^ k) ^ r.toNat else
∑ j ∈ Finset.range (N + 1),
Polynomial.C (Nat.choose (r.natAbs + j - 1) j : ℤ) *
Polynomial.X ^ (k * j)
end RamanujanLostNotebook.PartIII
end
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part III, Springer 2012, Chapter 6.