A158856 Triangle T(n, k) = coefficients of p(n, x), where p(n, x) = (1 - x^(2+floor((n-1)/2)))*(1 + (-1)^floor(n/2)*x^(1+floor(n/2))), read by rows.
1, 1, 1, 1, 0, -1, 1, 0, 0, -1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, -1, 0, -1, 1, 0, 1, 0, 0, -1, 0, -1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1
Offset: 0
Examples
Triangle begins as: 1; 1, 1; 1, 0, -1; 1, 0, 0, -1; 1, 0, 1, 0, 1; 1, 0, 1, 1, 0, 1; 1, 0, 1, 0, -1, 0, -1; 1, 0, 1, 0, 0, -1, 0, -1; 1, 0, 1, 0, 1, 0, 1, 0, 1; 1, 0, 1, 0, 1, 1, 0, 1, 0, 1; 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1;
Links
- G. C. Greubel, Rows n = 0..50 of the triangle, flattened
Programs
-
Mathematica
p[x_, n_]= (1-x^(2+Floor[(n-1)/2]))*(1+(-1)^Floor[n/2]*x^(1+Floor[n/2]))/(1 - x^2); Table[CoefficientList[p[x, n], x], {n,0,12}]//Flatten (* modified by G. C. Greubel, Mar 07 2022 *)
-
Sage
def p(n,x): return (1-x^(2+((n-1)//2)))*(1+(-1)^(n//2)*x^(1+(n//2)))/(1-x^2) def A158856(n,k): return ( p(n,x) ).series(x, n+1).list()[k] flatten([[A158856(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 07 2022
Formula
T(n, k) = coefficients of p(n, x), where p(n, x) = (Sum_{j=0..1+floor((n-1)/2)} x^j)*(Sum_{i=0..floor(n/2)} (-x)^i) and p(0, x) = 1.
From G. C. Greubel, Mar 07 2022: (Start)
T(n, k) = coefficients of p(n, x), where p(n, x) = (1 - x^(2+floor((n-1)/2)))*(1 + (-1)^floor(n/2)*x^(1+floor(n/2))).
Sum_{k=0..n} T(n, k) = floor((n+3)/2)*( (1 + floor(n/2)) mod 2 ).
Sum_{k=0..n} abs(T(n, k)) = A004524(n+3).
T(2*n, n) = (1 + (-1)^n)/2.
T(2*n+1, n) = (1 + (-1)^n)/2.
Sum_{k=0..floor(n/2)} T(n, k) = floor((n+4)/4).
T(n, k) = abs(A154957(n,k)). (End)
Extensions
Edited by G. C. Greubel, Mar 07 2022