OFFSET
0,4
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = (-1)^n if n = k; else -4 if n = 2k+2; else (n mod 2) if n = k+1; else 0.
G.f.: (1+x-x*y)/(1-x^2*y^2) - 4*x^2/(1-x^2*y).
(1, -x) + (x, x)/2 + (x, -x)/2 - 4(x^2, x^2) expressed in the notation of stretched Riordan arrays.
Column k has g.f.: (-x)^k + (x*(-x)^k + x^(k+1))/2 - 4*x^(2*k+2).
Sum_{k=0..n} T(n, k) = A115634(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A115635(n).
EXAMPLE
Triangle begins
1;
1, -1;
-4, 0, 1;
0, 0, 1, -1;
0, -4, 0, 0, 1;
0, 0, 0, 0, 1, -1;
0, 0, -4, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 1, -1;
0, 0, 0, -4, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 0, 1, -1;
0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1;
0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1;
0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1;
0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 0, 0, 1;
MATHEMATICA
T[n_, k_]:= If[k==n, (-1)^n, If[k==n-1, (1-(-1)^n)/2, If[n==2*k+2, -4, 0]]];
Table[T[n, k], {n, 0, 18}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 23 2021 *)
PROG
(Sage)
def A115633(n, k):
if (k==n): return (-1)^n
elif (k==n-1): return n%2
elif (n==2*k+2): return -4
else: return 0
flatten([[A115633(n, k) for k in (0..n)] for n in (0..18)]) # G. C. Greubel, Nov 23 2021
(PARI) A115633(n, k)=if(n==k, (-1)^n, bittest(n, 0), k==n-1, k+1==n\2, -4) \\ M. F. Hasler, Nov 24 2021
CROSSREFS
KEYWORD
AUTHOR
Paul Barry, Jan 27 2006
STATUS
approved