Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #78 Apr 30 2020 11:33:04
%S 1,0,1,0,1,4,0,1,18,30,0,1,74,360,360,0,1,310,3450,8880,6240,0,1,1382,
%T 31770,160080,271800,146160,0,1,6510,298662,2635920,8152200,10190880,
%U 4420080,0,1,32398,2918244,42687960,214527600,468669600,460474560,166924800
%N Number T(n,k) of colored set partitions of [n] where elements of subsets have distinct colors and exactly k colors are used; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%H Alois P. Heinz, <a href="/A323128/b323128.txt">Rows n = 0..140, flattened</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%e T(3,2) = 18: 1a|2a3b, 1a|2b3a, 1b|2a3b, 1b|2b3a, 1a3b|2a, 1b3a|2a, 1a3b|2b, 1b3a|2b, 1a2b|3a, 1b2a|3a, 1a2b|3b, 1b2a|3b, 1a|2a|3b, 1a|2b|3a, 1b|2a|3a, 1a|2b|3b, 1b|2a|3b, 1b|2b|3a.
%e Triangle T(n,k) begins:
%e 1;
%e 0, 1;
%e 0, 1, 4;
%e 0, 1, 18, 30;
%e 0, 1, 74, 360, 360;
%e 0, 1, 310, 3450, 8880, 6240;
%e 0, 1, 1382, 31770, 160080, 271800, 146160;
%e 0, 1, 6510, 298662, 2635920, 8152200, 10190880, 4420080;
%e ...
%p A:= proc(n, k) option remember; `if`(n=0, 1, add(k!/(k-j)!
%p *binomial(n-1, j-1)*A(n-j, k), j=1..min(k, n)))
%p end:
%p T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
%p seq(seq(T(n, k), k=0..n), n=0..10);
%t A[n_, k_] := A[n, k] = If[n==0, 1, Sum[k!/(k - j)! Binomial[n - 1, j - 1]* A[n - j, k], {j, Min[k, n]}]];
%t T[n_, k_] := Sum[A[n, k - i] (-1)^i Binomial[k, i], {i, 0, k}];
%t Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Apr 30 2020, after _Alois P. Heinz_ *)
%Y Columns k=0-1 give: A000007, A057427.
%Y Row sums give A104600.
%Y Main diagonal gives A137341.
%Y T(2n,n) gives A324523.
%K nonn,tabl
%O 0,6
%A _Alois P. Heinz_, Aug 30 2019