cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A299018 #20 May 24 2020 04:24:32
%S A299018 1,2,2,6,11,6,24,60,60,24,120,366,501,366,120,720,2532,4242,4242,2532,
%T A299018 720,5040,19764,38268,46863,38268,19764,5040,40320,172512,373104,
%U A299018 528336,528336,373104,172512,40320,362880,1668528,3942108,6237828,7213761,6237828,3942108,1668528,362880
%N 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).
%F A299018 P(0) = 0, P(1) = 1 and P(n) = n * (x + 1) * P(n - 1) - (n - 2)^2 * x * P(n - 2).
%e A299018 For n = 3, the polynomial is 6*x^2 + 11*x + 6.
%e A299018 The first few polynomials, as a table:
%e A299018 [1],
%e A299018 [2,    2],
%e A299018 [6,    11,    6],
%e A299018 [24,   60,    60,  24],
%e A299018 [120,  366,   501, 366, 120]
%p A299018 P:= proc(n) option remember; expand(`if`(n<2, n,
%p A299018       n*(x+1)*P(n-1)-(n-2)^2*x*P(n-2)))
%p A299018     end:
%p A299018 T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(P(n)):
%p A299018 seq(T(n), n=1..12);  # _Alois P. Heinz_, Jan 31 2018
%p A299018 A := proc(n,k) ## n >= 0 and k = 0 .. n
%p A299018     option remember;
%p A299018     if n = 0 and k = 0 then
%p A299018         1
%p A299018     elif n > 0 and k >= 0 and k <= n then
%p A299018         (n+1)*(A(n-1,k)+A(n-1,k-1))-(n-1)^2*A(n-2,k-1)
%p A299018     else
%p A299018         0
%p A299018     end if;
%p A299018 end proc: # _Yu-Sheng Chang_, Apr 14 2020
%t A299018 P[n_] := P[n] = Expand[If[n < 2, n, n (x+1) P[n-1] - (n-2)^2 x P[n-2]]];
%t A299018 row[n_] := CoefficientList[P[n], x];
%t A299018 row /@ Range[12] // Flatten (* _Jean-François Alcover_, Dec 10 2019 *)
%o A299018 (Sage)
%o A299018 @cached_function
%o A299018 def poly(n):
%o A299018     x = polygen(ZZ, 'x')
%o A299018     if n < 1:
%o A299018         return x.parent().zero()
%o A299018     elif n == 1:
%o A299018         return x.parent().one()
%o A299018     else:
%o A299018         return n * (x + 1) * poly(n - 1) - (n - 2)**2 * x * poly(n - 2)
%Y A299018 Very similar to A298854.
%Y A299018 Row sums are A277382(n-1) for n>0.
%Y A299018 Leftmost and rightmost columns are A000142.
%Y A299018 Alternating row sums are A177145.
%Y A299018 Alternating row sum of row 2*n+1 is A001818(n).
%K A299018 tabl,nonn,easy
%O A299018 1,2
%A A299018 _F. Chapoton_, Jan 31 2018