OFFSET
0,6
COMMENTS
Also the antidiagonals of the Lah triangle A271703.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
T(0,0) = T(2,1) = 1. If k < 1 or k > ceiling(n/2) then T(n,k) = 0. Otherwise:
T(n, k) = (n-1)*T(n-1, k) + T(n-2, k-1)
EXAMPLE
Triangle begins:
[0] 1
[1] 0
[2] 0, 1
[3] 0, 2
[4] 0, 6, 1
[5] 0, 24, 6
[6] 0, 120, 36, 1
[7] 0, 720, 240, 12
[8] 0, 5040, 1800, 120, 1
[9] 0, 40320, 15120, 1200, 20
MAPLE
T := (n, k) -> binomial(n-k-1, k-1)*(n-k)!/k!:
seq(seq(T(n, k), k=0..floor(n/2)), n=0..12);
# Alternative:
T := proc(n, k) option remember;
if (n=0 and k=0) or (n=2 and k=1) then 1 elif (k < 1) or (k > ceil(n/2)) then 0
else (n-1)*T(n-1, k) + T(n-2, k-1) fi end: seq(seq(T(n, k), k=0..n/2), n=0..12);
MATHEMATICA
Table[Binomial[n-k-1, k-1] (n-k)!/k!, {n, 0, 20}, {k, 0, Floor[n/2]}]//Flatten (* Harvey P. Dale, Oct 19 2021 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Peter Luschny, Dec 27 2019
STATUS
approved