OFFSET
0,3
COMMENTS
T(n,k) is defined for all n>=0 and k>=0. The triangle displays only positive terms. All other terms are zero.
LINKS
Alois P. Heinz, Columns k = 0..7, flattened
EXAMPLE
T(3,2) = 4: 2ab1a, 2ab1b, 1a2ab, 1b2ab.
T(3,3) = 13: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a.
T(4,2) = 6: 2ab1a1b, 1a2ab1b, 1a1b2ab, 2ab1b1a, 1b2ab1a, 1b1a2ab.
Triangle T(n,k) begins:
1;
1;
3;
4, 13;
6, 48, 75;
150, 536, 541;
300, 2820, 6320, 4683;
666, 11144, 50150, 81012, 47293;
936, 41346, 308080, 903210, 1134952, 545835;
...
MAPLE
C:= binomial:
g:= proc(n) option remember; n*2^(n-1) end:
h:= proc(n) option remember; local k; for k from
`if`(n=0, 0, h(n-1)) do if g(k)>=n then return k fi od
end:
b:= proc(n, i, k, p) option remember; `if`(n=0, p!,
`if`(i<1 or k<h(n), 0, add(b(n-i*j, min(n-i*j, i-1),
k, p+j)*C(C(k, i), j), j=0..n/i)))
end:
T:= (n, k)-> add(b(n$2, i, 0)*(-1)^(k-i)*C(k, i), i=0..k):
seq(seq(T(n, k), n=k..k*2^(k-1)), k=0..5);
MATHEMATICA
c = Binomial;
g[n_] := g[n] = n*2^(n - 1);
h[n_] := h[n] = Module[{k}, For[k = If[n == 0, 0,
h[n - 1]], True, k++, If[g[k] >= n, Return[k]]]];
b[n_, i_, k_, p_] := b[n, i, k, p] = If[n == 0, p!,
If[i < 1 || k < h[n], 0, Sum[b[n - i*j, Min[n - i*j, i - 1],
k, p + j]*c[c[k, i], j], {j, 0, n/i}]]];
T[n_, k_] := Sum[b[n, n, i, 0]*(-1)^(k - i)*c[k, i], {i, 0, k}];
Table[Table[T[n, k], {n, k, k*2^(k - 1)}], {k, 0, 5}] // Flatten (* Jean-François Alcover, Feb 22 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Sep 17 2019
STATUS
approved