A319298 Number T(n,k) of entries in the k-th blocks of all set partitions of [n] when blocks are ordered by increasing lengths (and increasing smallest elements); triangle T(n,k), n>=1, 1<=k<=n, read by rows.
1, 3, 1, 7, 7, 1, 21, 25, 13, 1, 66, 101, 71, 21, 1, 258, 366, 396, 166, 31, 1, 1079, 1555, 1877, 1247, 337, 43, 1, 4987, 7099, 9199, 7855, 3305, 617, 57, 1, 25195, 34627, 47371, 47245, 27085, 7681, 1045, 73, 1, 136723, 184033, 253108, 284968, 203278, 79756, 16126, 1666, 91, 1
Offset: 1
Examples
The 5 set partitions of {1,2,3} are: 1 |2 |3 1 |23 2 |13 3 |12 123 so there are 7 elements in the first (smallest) blocks, 7 in the second blocks and only 1 in the third blocks. Triangle T(n,k) begins: 1; 3, 1; 7, 7, 1; 21, 25, 13, 1; 66, 101, 71, 21, 1; 258, 366, 396, 166, 31, 1; 1079, 1555, 1877, 1247, 337, 43, 1; 4987, 7099, 9199, 7855, 3305, 617, 57, 1; 25195, 34627, 47371, 47245, 27085, 7681, 1045, 73, 1; ...
Links
- Alois P. Heinz, Rows n = 1..141, flattened
- Wikipedia, Partition of a set
Crossrefs
Programs
-
Maple
b:= proc(n, l) option remember; `if`(n=0, add(l[i]* x^i, i=1..nops(l)), add(binomial(n-1, j-1)* b(n-j, sort([l[], j])), j=1..n)) end: T:= n-> (p-> (seq(coeff(p, x, i), i=1..n)))(b(n, [])): seq(T(n), n=1..12); # second Maple program: b:= proc(n, i, t) option remember; `if`(n=0, [1, 0], `if`(i>n, 0, add((p-> p+`if`(t>0 and t-j<1, [0, p[1]*i], 0))(b(n-i*j, i+1, max(0, t-j))/j!*combinat[multinomial](n, i$j, n-i*j)), j=0..n/i))) end: T:= (n, k)-> b(n, 1, k)[2]: seq(seq(T(n, k), k=1..n), n=1..12); # Alois P. Heinz, Mar 02 2020
-
Mathematica
b[n_, l_] := b[n, l] = If[n == 0, Sum[l[[i]] x^i, {i, 1, Length[l]}], Sum[ Binomial[n-1, j-1] b[n-j, Sort[Append[l, j]]], {j, 1, n}]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, {}]]; Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Dec 28 2018, after Alois P. Heinz *)