login
A192011
Let P(0,x) = -1, P(1,x) = 2*x, and P(n,x) = x*P(n-1,x) - P(n-2,x) for n > 1. This sequence is the triangle of polynomial coefficients in order of decreasing exponents.
9
-1, 2, 0, 2, 0, 1, 2, 0, -1, 0, 2, 0, -3, 0, -1, 2, 0, -5, 0, 0, 0, 2, 0, -7, 0, 3, 0, 1, 2, 0, -9, 0, 8, 0, 1, 0, 2, 0, -11, 0, 15, 0, -2, 0, -1, 2, 0, -13, 0, 24, 0, -10, 0, -2, 0, 2, 0, -15, 0, 35, 0, -25, 0, 0, 0, 1, 2, 0, -17, 0, 48, 0, -49, 0, 10, 0, 3, 0, 2, 0, -19, 0, 63, 0, -84, 0, 35, 0, 3, 0, -1
OFFSET
0,2
FORMULA
T(n, k) = T(n-1, k) - T(n-2, k-2), where T(0, 0) = -1, T(n, 0) = 2 and 0 <= k <= n, n >= 0. -G. C. Greubel,May 19 2019
EXAMPLE
The first few rows are
-1;
2, 0;
2, 0, 1;
2, 0, -1, 0;
2, 0, -3, 0, -1;
2, 0, -5, 0, 0, 0;
2, 0, -7, 0, 3, 0, 1;
2, 0, -9, 0, 8, 0, 1, 0;
2, 0, -11, 0, 15, 0, -2, 0, -1;
2, 0, -13, 0, 24, 0, -10, 0, -2, 0;
2, 0, -15, 0, 35, 0, -25, 0, 0, 0, 1;
MAPLE
A192011:= proc(n, k)
option remember;
if k>n or k <0 or n<0 then
0;
elif n= 0 then
-1;
elif k=0 then
2;
else
procname(n-1, k)-procname(n-2, k-2);
end if;
end proc: #R. J. Mathar,Nov 03 2011
MATHEMATICA
p[0, _] = -1; p[1, x_]:= 2x; p[n_, x_]:= p[n, x] = x*p[n-1, x] - p[n-2, x]; row[n_]:= CoefficientList[p[n, x], x]; Table[row[n] // Reverse, {n, 0, 9}] // Flatten (*Jean-François Alcover,Nov 26 2012 *)
T[n_, k_]:= If[k<0 || k>n, 0, If[n==0 && k==0, -1, If[k==0, 2, T[n-1, k] - T[n-2, k-2]]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (*G. C. Greubel,May 19 2019 *)
PROG
(PARI) {T(n, k) = if(k<0 || k>n, 0, if(n==0 && k==0, -1, if(k==0, 2, T(n-1, k) - T(n-2, k-2)))) };
for(n=0, 10, for(k=0, n, print1(T(n, k), "," ))) \\G. C. Greubel,May 19 2019
(Sage)
def T(n, k):
if (k<0 or k>n): return 0
elif (n==0 and k==0): return -1
elif (k==0): return 2
else: return T(n-1, k) - T(n-2, k-2)
[[T(n, k) for k in (0..n)] for n in (0..10)] #G. C. Greubel,May 19 2019
CROSSREFS
Left hand diagonals are: T(n,0) = [-1,2,2,2,2,2,...], T(n,2) =A165747(n), T(n,4) =A067998(n+1), T(n,6) = -A058373(n), T(n,8) = (-1)^(n+1) *A167387(n+2) see alsoA052472(n.
KEYWORD
sign,easy,tabl
AUTHOR
Paul Curtz,Jun 21 2011
STATUS
approved