OFFSET
0,2
COMMENTS
Also total number of partitions of [k] into exactly n nonempty blocks, each of size at most n+1, for any k in the range n <= k <= n^2+n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..26
Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, Analysis of the Gift Exchange Problem, arXiv:1701.08394, 2017.
Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, On-Line Appendix I to "Analysis of the gift exchange problem"
Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, On-Line Appendix II to "Analysis of the gift exchange problem"
David Applegate and N. J. A. Sloane, The Gift Exchange Problem, arXiv:0907.0513 [math.CO], 2009.
MAPLE
with(combinat):
b:= proc(n, i, t) option remember; `if`(t*i<n, 0,
`if`(n=0, `if`(t=0, 1, 0), add(b(n-i*j, i-1, t-j)*
multinomial(n, n-i*j, i$j)/j!, j=0..min(t, n/i))))
end:
a:= n-> add(b(j, n+1, n), j=0..(n+1)*n):
seq(a(n), n=0..10);
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_, t_] := b[n, i, t] = If[t*i<n, 0, If[n==0, If[t==0, 1, 0], Sum[b[n-i*j, i-1, t-j]* multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j!, {j, 0, Min[t, n/i]}]]]; a[n_] := Sum[b[j, n+1, n], {j, 0, (n+1)*n}]; Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Mar 13 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 01 2017
STATUS
approved