cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A323099 #25 Dec 08 2020 17:20:42
%S A323099 1,0,1,0,2,4,0,5,30,30,0,15,210,540,360,0,52,1560,7800,12480,6240,0,
%T A323099 203,12586,109620,316680,365400,146160,0,877,110502,1583862,7366800,
%U A323099 14733600,13260240,4420080,0,4140,1051560,23995440,169011360,521640000,792892800,584236800,166924800
%N 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.
%H A323099 Alois P. Heinz, <a href="/A323099/b323099.txt">Rows n = 0..140, flattened</a>
%H A323099 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%F A323099 T(n,k) = Bell(n) * Sum_{i=0..k} (k-i)^n * (-1)^i * C(k,i).
%F A323099 T(n,k) = Bell(n) * A131689(n,k).
%F A323099 T(n,k) = Bell(n) * Stirling2(n,k) * k!.
%e A323099 Triangle T(n,k) begins:
%e A323099   1;
%e A323099   0,   1;
%e A323099   0,   2,      4;
%e A323099   0,   5,     30,      30;
%e A323099   0,  15,    210,     540,     360;
%e A323099   0,  52,   1560,    7800,   12480,     6240;
%e A323099   0, 203,  12586,  109620,  316680,   365400,   146160;
%e A323099   0, 877, 110502, 1583862, 7366800, 14733600, 13260240, 4420080;
%e A323099   ...
%p A323099 A:= proc(n, k) option remember; `if`(n=0, 1, add(
%p A323099       A(n-j, k)*binomial(n-1, j-1)*k^j, j=1..n))
%p A323099     end:
%p A323099 T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
%p A323099 seq(seq(T(n, k), k=0..n), n=0..10);
%p A323099 # second Maple program:
%p A323099 T:= (n, k)-> combinat[bell](n)*Stirling2(n,k)*k!:
%p A323099 seq(seq(T(n, k), k=0..n), n=0..10);
%t A323099 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 A323099 T[n_, k_] := Sum[A[n, k - i] (-1)^i Binomial[k, i], {i, 0, k}];
%t A323099 Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten
%t A323099 (* second program: *)
%t A323099 T[n_, k_] := BellB[n] StirlingS2[n, k] k!;
%t A323099 Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* _Jean-François Alcover_, Dec 08 2020, after _Alois P. Heinz_ *)
%Y A323099 Columns k=0-1 give: A000007, A000110 (for n>0).
%Y A323099 Row sums give A121017.
%Y A323099 Main diagonal gives A137341.
%Y A323099 Cf. A000142, A008277, A048993, A019538, A131689.
%K A323099 nonn,tabl
%O A323099 0,5
%A A323099 _Alois P. Heinz_, Aug 30 2019