OFFSET
0,5
LINKS
Alois P. Heinz, Rows n = 0..21, flattened
EXAMPLE
Triangle T(n,k) begins:
1;
0, 1;
0, 2, 1;
0, 6, 4, 3;
0, 24, 20, 18, 13;
0, 120, 114, 118, 114, 75;
0, 720, 750, 878, 924, 870, 541;
0, 5040, 5616, 7224, 8152, 8760, 7818, 4683;
0, 40320, 47304, 65514, 79682, 90084, 94560, 81078, 47293;
...
MAPLE
b:= proc(n, m, l) option remember; `if`(n=0, m!,
add(b(n-1, max(m, j), [subsop(1=NULL, l)[],
`if`(j<=m, 0, j)]), j={l[], m+1} minus {0}))
end:
A:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0),
`if`(k=1, n!, b(n, 0, [0$(k-1)]))):
T:= (n, k)-> A(n, k) -`if`(k=0, 0, A(n, k-1)):
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
b[n_, m_, l_List] := b[n, m, l] = If[n == 0, m!, Sum[b[n - 1, Max[m, j], Append[ReplacePart[l, 1 -> Nothing], If[j <= m, 0, j]]], {j, Append[l, m + 1] ~Complement~ {0}}]]; A[n_, k_] := If[k == 0, If[n == 0, 1, 0], If[k == 1, n!, b[n, 0, Array[0 &, k - 1]]]]; T [n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 04 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Sep 21 2016
STATUS
approved