Central trinomial coefficients
TheoremThree-term recurrence for central trinomial coefficients#✓fully proved
For a natural number \(m\), let \(T_m\) be the central trinomial coefficient, the coefficient of \(x^m\) in \((1 + x + x^2)^m\). For every natural number \(n\) the following holds, where for \(n = 0\) the index \(n - 1\) is read as \(0\) (the last term then vanishes, since \(3n = 0\)):
theorem centralTrinomialCoeff_three_term_recurrence (n : ℕ) :
(n + 1) * trinomialCoefficient (n + 1) (n + 1) =
(2 * n + 1) * trinomialCoefficient n n +
3 * n * trinomialCoefficient (n - 1) (n - 1)
noncomputable def trinomialCoefficient (n k : ℕ) : ℕ :=
((1 + Polynomial.X + Polynomial.X ^ 2 : Polynomial ℕ) ^ n).coeff k
MathlibExt/NumberTheory/TrinomialCoefficient.lean:34
Sources
- P. Blasiak, G. Dattoli, A. Horzela, K. A. Penson, and K. Zhukovsky, "Motzkin Numbers, Central Trinomial Coefficients and Hybrid Polynomials," Journal of Integer Sequences 11 (2008), Article 08.1.1, Corollary containing Equation (24), lines 364–369, https://cs.uwaterloo.ca/journals/JIS/VOL11/Penson/penson131.tex.
Uses 1 · Used by 1
TheoremCentral trinomial coefficients as Legendre values#✓fully proved
For a natural number \(n\), let \(c_n\) be the central trinomial coefficient, the coefficient of \(X^n\) in \((1 + X + X^2)^n\), and let \(P_n\) be the \(n\)th Legendre polynomial. Then, in the complex numbers,
Here \(P_n(-i/\sqrt{3})\) is computed through the shifted Legendre polynomial \(\tilde{P}_n(y) = \sum_{k=0}^{n} (-1)^k \binom{n}{k} \binom{n+k}{n} y^k\), which satisfies \(\tilde{P}_n(y) = P_n(1 - 2y)\), evaluated at \(y = (1 + i/\sqrt{3})/2\).
Proof: Bonnet's recurrence \((n+1) P_{n+1}(x) = (2n+1) x P_n(x) - n P_{n-1}(x)\), evaluated at \(x = -i/\sqrt{3}\) and rescaled by \(i^n \sqrt{3^n}\), becomes the central trinomial recurrence \((n+1) c_{n+1} = (2n+1) c_n + 3n c_{n-1}\) (OEIS A002426); both sides agree at \(n = 0, 1\).
public theorem centralTrinomialCoeff_eq_legendre_specialValue
(n : ℕ) :
(trinomialCoefficient n n : ℂ) =
Complex.I ^ n * (Real.sqrt ((3 : ℝ) ^ n) : ℂ) *
Polynomial.aeval ((1 + Complex.I / (Real.sqrt 3 : ℂ)) / 2)
(Polynomial.shiftedLegendre n)
noncomputable def trinomialCoefficient (n k : ℕ) : ℕ :=
((1 + Polynomial.X + Polynomial.X ^ 2 : Polynomial ℕ) ^ n).coeff k
MathlibExt/NumberTheory/TrinomialCoefficient.lean:34
Sources
- P. Blasiak, G. Dattoli, A. Horzela, K. A. Penson, and K. Zhukovsky, "Motzkin Numbers, Central Trinomial Coefficients and Hybrid Polynomials," Journal of Integer Sequences 11 (2008), Article 08.1.1, Proposition with equation
eq20, lines 337-343, https://cs.uwaterloo.ca/journals/JIS/VOL11/Penson/penson131.tex.
Uses 2
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.