OFFSET
0,5
COMMENTS
Row n has 1+floor(n/2) entries.
Sum of entries in row n is A002628(n).
FORMULA
EXAMPLE
T(6,3)=3 because we have 125634, 341256, and 563412.
Triangle starts:
1;
1;
1, 1;
3, 2;
11, 9, 1;
53, 44, 9;
309, 265, 66, 3;
2119, 1854, 530, 44;
MAPLE
d[0] := 1: for n to 51 do d[n] := n*d[n-1]+(-1)^n end do: a := proc (n, k) if n = 0 and k = 0 then 1 elif k <= (1/2)*n then binomial(n-k, k)*d[n+1-k]/(n-k) else 0 end if end proc: for n from 0 to 12 do seq(a(n, k), k = 0 .. (1/2)*n) end do; # yields sequence in triangular form
MATHEMATICA
d[0] = 1; d[n_] := d[n] = n d[n - 1] + (-1)^n;
T[n_, k_] := If[n == 0 && k == 0, 1, If[k <= n/2, Binomial[n - k, k] d[n + 1 - k]/(n - k), 0]];
Table[T[n, k], {n, 0, 20}, {k, 0, Quotient[n, 2]}] // Flatten (* Jean-François Alcover, May 23 2020 *)
PROG
(PARI) d(n) = if(n<2, !n , round(n!/exp(1)));
for(n=0, 20, for(k=0, (n\2), print1(binomial(n - k, k)*(d(n - k) + d(n - k - 1)), ", "); ); print(); ) \\ Indranil Ghosh, Apr 12 2017
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Sep 06 2010
STATUS
approved