login
A271731
Number of set partitions of [n] with maximal block length multiplicity equal to two.
2
1, 0, 9, 25, 70, 406, 2093, 10935, 41961, 267751, 1745040, 9744384, 60271016, 369277000, 2981920373, 19297914599, 136978951579, 1039245386419, 8924928983999, 65392069094065, 539711448752906, 4489189106832134, 39604974257078180, 404561197077466250
OFFSET
2,3
COMMENTS
At least one block length occurs exactly 2 times, and all block lengths occur at most 2 times.
LINKS
MAPLE
with(combinat):
b:= proc(n, i, k) option remember; `if`(n=0, 1,
`if`(i<1, 0, add(multinomial(n, n-i*j, i$j)
*b(n-i*j, i-1, k)/j!, j=0..min(k, n/i))))
end:
a:= n-> b(n$2, 2)-b(n$2, 1):
seq(a(n), n=2..30);
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!);
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[multinomial[n, Join[{n - i*j}, Table[i, j]]]*b[n - i*j, i - 1, k]/j!, {j, 0, Min[k, n/i] }]]];
a[n_] := b[n, n, 2] - b[n, n, 1];
Table[a[n], {n, 2, 30}] (* Jean-François Alcover, May 08 2018, after Alois P. Heinz *)
CROSSREFS
Column k=2 of A271423.
Sequence in context: A147318 A146589 A146866 * A126363 A036836 A125997
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 13 2016
STATUS
approved