login
A323099
Number T(n,k) of colored set partitions of [n] where exactly k colors are used for the elements; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
3
1, 0, 1, 0, 2, 4, 0, 5, 30, 30, 0, 15, 210, 540, 360, 0, 52, 1560, 7800, 12480, 6240, 0, 203, 12586, 109620, 316680, 365400, 146160, 0, 877, 110502, 1583862, 7366800, 14733600, 13260240, 4420080, 0, 4140, 1051560, 23995440, 169011360, 521640000, 792892800, 584236800, 166924800
OFFSET
0,5
LINKS
FORMULA
T(n,k) = Bell(n) * Sum_{i=0..k} (k-i)^n * (-1)^i * C(k,i).
T(n,k) = Bell(n) * A131689(n,k).
T(n,k) = Bell(n) * Stirling2(n,k) * k!.
EXAMPLE
Triangle T(n,k) begins:
1;
0, 1;
0, 2, 4;
0, 5, 30, 30;
0, 15, 210, 540, 360;
0, 52, 1560, 7800, 12480, 6240;
0, 203, 12586, 109620, 316680, 365400, 146160;
0, 877, 110502, 1583862, 7366800, 14733600, 13260240, 4420080;
...
MAPLE
A:= proc(n, k) option remember; `if`(n=0, 1, add(
A(n-j, k)*binomial(n-1, j-1)*k^j, j=1..n))
end:
T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
seq(seq(T(n, k), k=0..n), n=0..10);
# second Maple program:
T:= (n, k)-> combinat[bell](n)*Stirling2(n, k)*k!:
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
A[n_, k_] := A[n, k] = If[n==0, 1, Sum[A[n-j, k] Binomial[n-1, j-1] k^j, {j, 1, n}]];
T[n_, k_] := Sum[A[n, k - i] (-1)^i Binomial[k, i], {i, 0, k}];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten
(* second program: *)
T[n_, k_] := BellB[n] StirlingS2[n, k] k!;
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 08 2020, after Alois P. Heinz *)
CROSSREFS
Columns k=0-1 give: A000007, A000110 (for n>0).
Row sums give A121017.
Main diagonal gives A137341.
Sequence in context: A274086 A255982 A256061 * A002652 A202541 A070676
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Aug 30 2019
STATUS
approved