|
|
A299018
|
|
Triangle read by rows: T(n,k) is the coefficient of x^k in the polynomial P(n) = n*(x + 1)*P(n - 1) - (n - 2)^2*x*P(n - 2).
|
|
0
|
|
|
1, 2, 2, 6, 11, 6, 24, 60, 60, 24, 120, 366, 501, 366, 120, 720, 2532, 4242, 4242, 2532, 720, 5040, 19764, 38268, 46863, 38268, 19764, 5040, 40320, 172512, 373104, 528336, 528336, 373104, 172512, 40320, 362880, 1668528, 3942108, 6237828, 7213761, 6237828, 3942108, 1668528, 362880
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
P(0) = 0, P(1) = 1 and P(n) = n * (x + 1) * P(n - 1) - (n - 2)^2 * x * P(n - 2).
|
|
EXAMPLE
|
For n = 3, the polynomial is 6*x^2 + 11*x + 6.
The first few polynomials, as a table:
[1],
[2, 2],
[6, 11, 6],
[24, 60, 60, 24],
[120, 366, 501, 366, 120]
|
|
MAPLE
|
P:= proc(n) option remember; expand(`if`(n<2, n,
n*(x+1)*P(n-1)-(n-2)^2*x*P(n-2)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(P(n)):
A := proc(n, k) ## n >= 0 and k = 0 .. n
option remember;
if n = 0 and k = 0 then
1
elif n > 0 and k >= 0 and k <= n then
(n+1)*(A(n-1, k)+A(n-1, k-1))-(n-1)^2*A(n-2, k-1)
else
0
end if;
|
|
MATHEMATICA
|
P[n_] := P[n] = Expand[If[n < 2, n, n (x+1) P[n-1] - (n-2)^2 x P[n-2]]];
row[n_] := CoefficientList[P[n], x];
|
|
PROG
|
(Sage)
@cached_function
def poly(n):
x = polygen(ZZ, 'x')
if n < 1:
return x.parent().zero()
elif n == 1:
return x.parent().one()
else:
return n * (x + 1) * poly(n - 1) - (n - 2)**2 * x * poly(n - 2)
|
|
CROSSREFS
|
Leftmost and rightmost columns are A000142.
Alternating row sum of row 2*n+1 is A001818(n).
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|