OFFSET
0,8
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
FORMULA
EXAMPLE
T(3,0) = 1: 3.
T(3,1) = 2: 21a, 1a1a1a.
T(3,2) = 3: 1a1a1b, 1a1b1a, 1a1b1b. (The two kinds of 1's are labeled 1a and 1b)
T(3,3) = 1: 1a1b1c.
Triangle T(n,k) begins:
1;
0, 1;
1, 1, 1;
1, 2, 3, 1;
2, 3, 8, 6, 1;
2, 5, 19, 26, 10, 1;
4, 7, 43, 97, 66, 15, 1;
4, 11, 93, 334, 361, 141, 21, 1;
7, 15, 197, 1095, 1778, 1066, 267, 28, 1;
8, 22, 409, 3482, 8207, 7108, 2668, 463, 36, 1;
...
MAPLE
f:= (n, k)-> add(Stirling2(n, j), j=0..k):
b:= proc(n, i, k) option remember; `if`(n=0 or i<2,
f(n, k), add(b(n-i*j, i-1, k), j=0..n/i))
end:
T:= (n, k)-> b(n$2, k)-`if`(k=0, 0, b(n$2, k-1)):
seq(seq(T(n, k), k=0..n), n=0..14);
# second Maple program:
b:= proc(n, i, k) option remember; `if`(n=0 or i<2,
k^n, b(n, i-1, k) +b(n-i, min(i, n-i), k))
end:
T:= (n, k)-> add((-1)^i*b(n$2, k-i)/((k-i)!*i!), i=0..k):
seq(seq(T(n, k), k=0..n), n=0..14);
MATHEMATICA
f[n_, k_] := Sum[StirlingS2[n, j], {j, 0, k}];
b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i < 2, f[n, k], Sum[b[n - i*j, i - 1, k], {j, 0, n/i}]];
T[n_, k_] := b[n, n, k] - If[k == 0, 0, b[n, n, k - 1]];
Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 17 2018, translated from Maple *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Sep 22 2017
EXTENSIONS
Definition clarified by N. J. A. Sloane, Dec 12 2020
STATUS
approved