OFFSET
0,2
COMMENTS
Also, number of scenarios in the Gift Exchange Game when a gift can be stolen at most 5 times. - N. J. A. Sloane, Jan 25 2017
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..100
Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, Analysis of the Gift Exchange Problem, arXiv:1701.08394 [math.CO], 2017.
Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, On-Line Appendix I to "Analysis of the gift exchange problem", giving Type D recurrences for G_1(n) through G_15(n) (see A001515, A144416, A144508, A144509, A149187, A281358-A281361)
Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, On-Line Appendix II to "Analysis of the gift exchange problem", giving Type C recurrences for G_1(n) through G_15(n) (see A001515, A144416, A144508, A144509, A149187, A281358-A281361)
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(k, 6, n), k=0..6*n):
seq(a(n), n=0..20); # Alois P. Heinz, Sep 17 2015
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, Prepend[Array[i&, j], n-i*j]]/j!, {j, 0, Min[t, n/i]}]]]; a[n_] := Sum[b[k, 6, n], {k, 0, 6*n}]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Dec 06 2016 after Alois P. Heinz *)
PROG
(PARI) {a(n) = sum(i=n, 6*n, i!*polcoef(sum(j=1, 6, x^j/j!)^n, i))/n!} \\ Seiichi Manyama, May 22 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 13 2009
STATUS
approved