login
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.
2
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,1
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)
EXAMPLE
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;
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 *)
PROG
(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
CROSSREFS
Sequence in context: A103452 A131219 A127970 * A154957 A140865 A114000
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Mar 28 2009
EXTENSIONS
Edited by G. C. Greubel, Mar 07 2022
STATUS
approved