A231599 T(n,k) is the coefficient of x^k in Product_{i=1..n} (1-x^i); triangle T(n,k), n >= 0, 0 <= k <= A000217(n), read by rows.
1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, 0, 0, 2, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 0, 0, 1, 1, -1, 1, -1, -1, 0, 0, 1, 0, 2, 0, -1, -1, -1, -1, 0, 2, 0, 1, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 0, 1, 1, 0, -1, -1, -2, 0
Offset: 0
Examples
For n=2 the corresponding polynomial is (1-x)*(1-x^2) = 1 -x - x^2 + x^3. Irregular triangle starts: k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 n 0 1 1 1 -1 2 1 -1 -1 1 3 1 -1 -1 0 1 1 -1 4 1 -1 -1 0 0 2 0 0 -1 -1 1 5 1 -1 -1 0 0 1 1 1 -1 -1 -1 0 0 1 1 -1
Links
- Alois P. Heinz, Rows n = 0..40, flattened
- Dorin Andrica and Ovidiu Bagdasar, On some results concerning the polygonal polynomials, Carpathian Journal of Mathematics (2019) Vol. 35, No. 1, 1-11.
- Tilman Piesk, Rows n = 0..40 as left-aligned and centered table
Crossrefs
Programs
-
Maple
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p))) (expand(mul(1-x^i, i=1..n))): seq(T(n), n=0..10); # Alois P. Heinz, Dec 22 2013
-
Mathematica
Table[If[k == 0, 1, Coefficient[Product[(1 - x^i), {i, n}], x^k]], {n, 0, 6}, {k, 0, (n^2 + n)/2}] // Flatten (* Michael De Vlieger, Mar 04 2018 *)
-
PARI
row(n) = pol = prod(i=1, n, 1 - x^i); for (i=0, poldegree(pol), print1(polcoeff(pol, i), ", ")); \\ Michel Marcus, Dec 21 2013
-
Python
from sympy import poly, symbols def a231599_row(n): if n == 0: return [1] x = symbols('x') p = 1 for i in range(1, n+1): p *= poly(1-x**i) p = p.all_coeffs() return p[::-1] # Tilman Piesk, Feb 21 2016
Formula
T(n,k) = [x^k] Product_{i=1..n} (1-x^i).
T(n,k) = T(n-1, k) + (-1)^n*T(n-1, n*(n+1)/2-k), n > 1. - Gevorg Hmayakyan, Feb 09 2017 [corrected by Giuliano Cabrele, Mar 02 2018]
Comments