OFFSET
0,7
LINKS
Alois P. Heinz, Rows n = 0..1000, flattened
Wikipedia, Partition of a set
FORMULA
EXAMPLE
T(10,1) = 10: (10), 1234, 127, 136, 145, 19, 235, 28, 37, 46.
T(10,2) = 23: 123|4, 124|3, 12|34, 12|7, 134|2, 13|24, 13|6, 14|23, 14|5, 15|4, 16|3, 17|2, 1|234, 1|27, 1|36, 1|45, 1|9, 23|5, 25|3, 2|35, 2|8, 3|7, 4|6.
T(10,3) = 10: 12|3|4, 13|2|4, 14|2|3, 1|23|4, 1|24|3, 1|2|34, 1|2|7, 1|3|6, 1|4|5, 2|3|5.
T(10,4) = 1: 1|2|3|4.
Triangle T(n,k) begins:
1;
0, 1;
0, 1;
0, 2, 1;
0, 2, 1;
0, 3, 2;
0, 4, 5, 1;
0, 5, 6, 1;
0, 6, 9, 2;
0, 8, 13, 3;
0, 10, 23, 10, 1;
0, 12, 27, 11, 1;
0, 15, 40, 19, 2;
0, 18, 51, 26, 3;
0, 22, 71, 40, 5;
0, 27, 100, 73, 16, 1;
...
MAPLE
b:= proc(n, i, k) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, x^k, b(n, i-1, k) +(t-> b(n-i, t, k)*k
+b(n-i, t, k+1))(min(n-i, i-1))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, 0)):
seq(T(n), n=0..20);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[i(i+1)/2 < n, 0,
If[n == 0, x^k, b[n, i-1, k] + With[{t = Min[n-i, i-1]},
b[n-i, t, k]*k + b[n-i, t, k+1]]]];
T[n_] := CoefficientList[b[n, n, 0], x];
T /@ Range[0, 20] // Flatten (* Jean-François Alcover, Mar 12 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Dec 29 2019
STATUS
approved