%I #11 Sep 08 2022 08:45:41
%S 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,
%T 1,1,42,210,420,420,210,42,1,1,56,336,840,1120,840,336,56,1,1,72,504,
%U 1512,2520,2520,1512,504,72,1,1,90,720,2520,5040,6300,5040,2520,720,90,1
%N Triangle T(n,k) = n*(n-1)*binomial(n-2, k-1) for 1 <= k <= n-1, n >= 2, and T(n,0) = T(n,n) = 1 for n >= 0, read by rows.
%H G. C. Greubel, <a href="/A155864/b155864.txt">Rows n = 0..50 of the triangle, flattened</a>
%F 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.
%F From _Franck Maminirina Ramaharo_, Dec 04 2018: (Start)
%F T(n, k) = n*(n-1)*binomial(n-2, k-1) with T(n, 0) = T(n, n) = 1.
%F n-th row polynomial is x^n + n*(n - 1)*x*(x + 1)^(n - 2) + (1 + (-1)^(2^n))/2.
%F G.f.: 1/(1 - y) + 1/(1 - x*y) + 2*x*y^2/(1 - y - x*y)^3 - 1.
%F E.g.f.: exp(y) + exp(x*y) + x*y^2*exp(y + x*y) - 1. (End)
%F Sum_{k=0..n} T(n, k) = 2 - [n=0] + A001815(n). - _G. C. Greubel_, Jun 04 2021
%e Triangle begins:
%e 1;
%e 1, 1;
%e 1, 2, 1;
%e 1, 6, 6, 1;
%e 1, 12, 24, 12, 1;
%e 1, 20, 60, 60, 20, 1;
%e 1, 30, 120, 180, 120, 30, 1;
%e 1, 42, 210, 420, 420, 210, 42, 1;
%e 1, 56, 336, 840, 1120, 840, 336, 56, 1;
%e 1, 72, 504, 1512, 2520, 2520, 1512, 504, 72, 1;
%e 1, 90, 720, 2520, 5040, 6300, 5040, 2520, 720, 90, 1;
%e ...
%t (* First program *)
%t p[n_, x_]:= p[n,x]= If[n==0, 1, 1 + x^n + x*D[(x+1)^(n), {x, 2}]];
%t Flatten[Table[CoefficientList[p[n,x], x], {n, 0, 12}]]
%t (* Second program *)
%t 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 *)
%o (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 */
%o (Magma)
%o A155864:= func< n,k | k eq 0 or k eq n select 1 else n*(n-1)*Binomial(n-2, k-1) >;
%o [A155864(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Jun 04 2021
%o (Sage)
%o def A155864(n,k): return 1 if (k==0 or k==n) else n*(n-1)*binomial(n-2,k-1)
%o flatten([[A155864(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Jun 04 2021
%Y Cf. A001815, A155863, A155865.
%K nonn,tabl,easy
%O 0,5
%A _Roger L. Bagula_, Jan 29 2009
%E Edited and name clarified by _Franck Maminirina Ramaharo_, Dec 04 2018