OFFSET
0,5
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = coefficients of p(n, x), where p(n, x) = 1 + x^n + x*((d/dx)^2 (1+x)^n), with T(0, 0) = 1.
From Franck Maminirina Ramaharo, Dec 04 2018: (Start)
T(n, k) = n*(n-1)*binomial(n-2, k-1) with T(n, 0) = T(n, n) = 1.
n-th row polynomial is x^n + n*(n - 1)*x*(x + 1)^(n - 2) + (1 + (-1)^(2^n))/2.
G.f.: 1/(1 - y) + 1/(1 - x*y) + 2*x*y^2/(1 - y - x*y)^3 - 1.
E.g.f.: exp(y) + exp(x*y) + x*y^2*exp(y + x*y) - 1. (End)
Sum_{k=0..n} T(n, k) = 2 - [n=0] + A001815(n). - G. C. Greubel, Jun 04 2021
EXAMPLE
Triangle begins:
1;
1, 1;
1, 2, 1;
1, 6, 6, 1;
1, 12, 24, 12, 1;
1, 20, 60, 60, 20, 1;
1, 30, 120, 180, 120, 30, 1;
1, 42, 210, 420, 420, 210, 42, 1;
1, 56, 336, 840, 1120, 840, 336, 56, 1;
1, 72, 504, 1512, 2520, 2520, 1512, 504, 72, 1;
1, 90, 720, 2520, 5040, 6300, 5040, 2520, 720, 90, 1;
...
MATHEMATICA
(* First program *)
p[n_, x_]:= p[n, x]= If[n==0, 1, 1 + x^n + x*D[(x+1)^(n), {x, 2}]];
Flatten[Table[CoefficientList[p[n, x], x], {n, 0, 12}]]
(* Second program *)
Table[If[k==0 || k==n, 1, 2*Binomial[n, 2]*Binomial[n-2, k-1]], {n, 0, 12}, {k, 0, n}] //Flatten (* G. C. Greubel, Jun 04 2021 *)
PROG
(Maxima) T(n, k) := ratcoef(x^n + n*(n-1)*x*(x+1)^(n-2) + (1 + (-1)^(2^n))/2, x, k)$ create_list(T(n, k), n, 0, 12, k, 0, n); /* Franck Maminirina Ramaharo, Dec 04 2018 */
(Magma)
A155864:= func< n, k | k eq 0 or k eq n select 1 else n*(n-1)*Binomial(n-2, k-1) >;
[A155864(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 04 2021
(Sage)
def A155864(n, k): return 1 if (k==0 or k==n) else n*(n-1)*binomial(n-2, k-1)
flatten([[A155864(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 04 2021
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Jan 29 2009
EXTENSIONS
Edited and name clarified by Franck Maminirina Ramaharo, Dec 04 2018
STATUS
approved