OFFSET
0,10
COMMENTS
Only coefficients of x^k for k <= degree of p(n,x) are included. With this then, since p(2,x) = 0, row 2 is empty.
The same polynomial coefficients may be obtained, without signs, with the use of the recurrence p(x, n) = (x+1)*p(x, n-1) - (x^2-1)*p(x, n-2), and p(x, 0) = 1, p(x, 1) = x-1.
LINKS
Robert Israel, Table of n, a(n) for n = 0..10103(rows 0 to 141, flattened)
FORMULA
T(n, k) = coefficient [x^k] ( p(x, n) ), where p(x,n) = (x-1)*p(x,n-1) - (x^2-1)*p(x,n-2), p(x,0) = 1, p(x,1) = x+1.
Sum_{k >= 0} T(n, k) = A130706(n).
From Robert Israel, Dec 03 2018: (Start)
T(n,k) = T(n-1,k-1) - T(n-1,k) - T(n-2,k-2) + T(n-2,k).
G.f. as array: (1-2*x)/(1 + x*(y-1)+x^2*(1-y^2)).
T(n,0) = (-1)^(n+1)*A000045(n-2) for n >= 3. (End)
EXAMPLE
First few rows are:
1;
1, 1;
{};
1, 1, -1, -1;
-1, 0, 2, 0, -1;
2, 0, -4, 0, 2;
-3, 2, 7, -4, -5, 2, 1;
5, -5, -11, 11, 7, -7, -1, 1;
-8, 12, 16, -28, -8, 20, 0, -4;
13, -25, -20, 60, -2, -46, 12, 12, -3, -1;
-21, 50, 19, -120, 38, 92, -50, -24, 15, 2, -1;
MAPLE
F:= proc(n) option remember; expand((1-x)*procname(n-1)+(1-x^2)*procname(n-2)) end proc:
F(0):= 1: F(1):= 1+x:
R:=proc(n) local V, j;
V:= F(n);
seq(coeff(V, x, j), j=0..degree(V))
end proc:
for i from 0 to 20 do R(i) od; # Robert Israel, Dec 03 2018
MATHEMATICA
P[x, 0]= 1; P[x, 1]= x+1; P[x_, n_]:= P[x, n]= (x-1)*(P[x, n-1] - (x+1)*P[x, n-2]);
Table[CoefficientList[P[x, n], x], {n, 0, 10}]//Flatten
PROG
(Magma)
m:=12;
function p(n, x)
if n le 1 then return (x+1)^n;
else return (x-1)*(p(n-1, x) - (x+1)*p(n-2, x)); end if;
end function;
R<x>:=PowerSeriesRing(Integers(), m+2);
T:= func< n, k | Coefficient(R!( p(n, x) ), k) >;
[1, 1, 1] cat [T(n, k): k in [0..n], n in [3..m]]; // G. C. Greubel, Jul 31 2023
(SageMath)
def p(n, x):
if n<2: return (x+1)^n
else: return (x-1)*(p(n-1, x) - (x+1)*p(n-2, x))
def T(n):
P.<x> = PowerSeriesRing(QQ)
return P( p(n, x) ).list()
flatten([T(n) for n in range(13)]) # G. C. Greubel, Jul 31 2023
CROSSREFS
KEYWORD
tabf,sign
AUTHOR
Roger L. Bagula, Mar 21 2008
EXTENSIONS
Edited by Robert Israel, Dec 03 2018
STATUS
approved