%I #61 Aug 02 2024 04:33:00
%S 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,
%T 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,
%U 1,0,0,-1,-1,1,1,-1,-1,0,0,1,0,1,1,0,-1,-1,-2,0
%N 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.
%C From _Tilman Piesk_, Feb 21 2016: (Start)
%C The sum of each row is 0. The even rows are symmetric; in the odd rows numbers with the same absolute value and opposed signum are symmetric to each other.
%C The odd rows where n mod 4 = 3 have the central value 0.
%C The even rows where n mod 4 = 0 have positive central values. They form the sequence A269298 and are also the rows maximal values.
%C A086376 contains the maximal values of each row, A160089 the maximal absolute values, and A086394 the absolute parts of the minimal values.
%C Rows of this triangle can be used to efficiently calculate values of A026807.
%C (End)
%H Alois P. Heinz, <a href="/A231599/b231599.txt">Rows n = 0..40, flattened</a>
%H Dorin Andrica and Ovidiu Bagdasar, <a href="https://doi.org/10.37193/CJM.2019.01.01">On some results concerning the polygonal polynomials</a>, Carpathian Journal of Mathematics (2019) Vol. 35, No. 1, 1-11.
%H Tilman Piesk, Rows n = 0..40 as <a href="http://paste.watchduck.net/1602/A231599_left.html">left-aligned</a> and <a href="http://paste.watchduck.net/1602/A231599_centered.html">centered</a> table
%F T(n,k) = [x^k] Product_{i=1..n} (1-x^i).
%F 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]
%e For n=2 the corresponding polynomial is (1-x)*(1-x^2) = 1 -x - x^2 + x^3.
%e Irregular triangle starts:
%e k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
%e n
%e 0 1
%e 1 1 -1
%e 2 1 -1 -1 1
%e 3 1 -1 -1 0 1 1 -1
%e 4 1 -1 -1 0 0 2 0 0 -1 -1 1
%e 5 1 -1 -1 0 0 1 1 1 -1 -1 -1 0 0 1 1 -1
%p T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))
%p (expand(mul(1-x^i, i=1..n))):
%p seq(T(n), n=0..10); # _Alois P. Heinz_, Dec 22 2013
%t 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 *)
%o (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
%o (Python)
%o from sympy import poly, symbols
%o def a231599_row(n):
%o if n == 0:
%o return [1]
%o x = symbols('x')
%o p = 1
%o for i in range(1, n+1):
%o p *= poly(1-x**i)
%o p = p.all_coeffs()
%o return p[::-1]
%o # _Tilman Piesk_, Feb 21 2016
%Y Cf. A000217 (triangular numbers).
%Y Cf. A086376, A160089, A086394 (maxima, etc.).
%Y Cf. A269298 (central nonzero values).
%K sign,look,tabf
%O 0,20
%A _Marc Bogaerts_, Nov 11 2013