A208437 Triangular array read by rows: T(n,k) is the number of set partitions of {1,2,...,n} that have exactly k distinct block sizes.
1, 2, 2, 3, 5, 10, 2, 50, 27, 116, 60, 2, 560, 315, 142, 1730, 2268, 282, 6123, 14742, 1073, 30122, 72180, 12600, 2, 116908, 464640, 97020, 32034, 507277, 2676366, 997920, 2, 2492737, 16400098, 8751600, 136853, 15328119, 94209206, 81225144, 1527528, 56182092, 673282610, 614128515, 37837800
Offset: 1
Examples
: 1; : 2; : 2, 3; : 5, 10; : 2, 50; : 27, 116, 60; : 2, 560, 315; : 142, 1730, 2268; : 282, 6123, 14742; : 1073, 30122, 72180, 12600;
Links
- Alois P. Heinz, Rows n = 1..220, flattened
- Philippe Flajolet and Robert Sedgewick, Analytic Combinatorics, Cambridge Univ. Press, 2009, page 180.
Programs
-
Maple
with(combinat): b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0, add(multinomial(n, n-i*j, i$j)/j!* b(n-i*j, i-1)*`if`(j=0, 1, x), j=0..n/i)))) end: T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)): seq(T(n), n=1..16); # Alois P. Heinz, Aug 21 2014
-
Mathematica
nn = 15; p = Product[1 + y (Exp[x^i/i!] - 1), {i, 1, nn}];f[list_] := Select[list, # > 0 &]; Map[f, Drop[ Range[0, nn]! CoefficientList[Series[p, {x, 0, nn}], {x, y}], 1]] // Flatten
Formula
E.g.f.: Product_{i>=1} 1 + y *(exp(x^i/i!)-1).
T(n*(n+1)/2,n) = A022915(n). - Alois P. Heinz, Apr 08 2016
Comments