%I #33 May 22 2019 21:04:24
%S 1,3,31,842,45296,4061871,546809243,103123135501,25942945219747,
%T 8394104851717686,3395846808758759686,1679398297627675722593,
%U 996789456118195908366641,699283226713639676370419067,572385833490097906671186099971,540635257271794961275858251107746,583630397618757664934692641037584628
%N a(n) is the total number of partitions of [1, 2, ..., k] into exactly n blocks, each of size 1, 2 or 3, for 0 <= k <= 3n.
%C Also, number of scenarios in the Gift Exchange Game when a gift can be stolen at most twice. - _N. J. A. Sloane_, Jan 25 2017
%H David Applegate and N. J. A. Sloane, <a href="/A144416/b144416.txt">Table of n, a(n) for n = 0..100</a>
%H Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, <a href="http://arxiv.org/abs/1701.08394">Analysis of the Gift Exchange Problem</a>, arXiv:1701.08394 [math.CO], 2017.
%H Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, <a href="/A144416/a144416.txt">On-Line Appendix I to "Analysis of the gift exchange problem"</a>, giving Type D recurrences for G_1(n) through G_15(n) (see A001515, A144416, A144508, A144509, A149187, A281358-A281361)
%H Moa Apagodu, David Applegate, N. J. A. Sloane, and Doron Zeilberger, <a href="/A144416/a144416_1.txt">On-Line Appendix II to "Analysis of the gift exchange problem"</a>, giving Type C recurrences for G_1(n) through G_15(n) (see A001515, A144416, A144508, A144509, A149187, A281358-A281361)
%H David Applegate and N. J. A. Sloane, <a href="http://arxiv.org/abs/0907.0513">The Gift Exchange Problem</a>, arXiv:0907.0513 [math.CO], 2009.
%F a(n) = Sum_{ b,c >= 0, b+c <= n } (n+b+2c)!/ ((n-b-c)! b! c! 2^b 6^c).
%F The sum is dominated by the b=0, c=n term, so a(n) ~ constant*(3*n)!/(n!*6^n).
%e a(0) = 1;
%e a(1) = 3: {1} {12} {123}
%e a(2) = 31: {1,2} {1,23} {2,13} {3,12} {1,234} {2,134} {3,124} {4,123}
%e {12,34} {13,24} {14,23} {12,345} {13,245} {14,235} {15,234} {23,145} {24,135}
%e {25,134} {34,125} {35,124} {45,123} {123,456} {124,356} {125,346} {126,345}
%e {134,256} {135,246} {136,245} {145,236} {146,235} {156,234}.
%t t[n_, n_] = 1; t[n_ /; n >= 0, k_] /; 0 <= k <= 3*n := t[n, k] = t[n-1, k-1] + (k-1)*t[n-1, k-2] + (1/2)*(k-1)*(k-2)*t[n-1, k-3]; t[_, _] = 0; a[n_] := Sum[t[n, k], {k, 0, 3*n}]; Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Feb 18 2017 *)
%o (PARI) {a(n) = sum(i=n, 3*n, i!*polcoef(sum(j=1, 3, x^j/j!)^n, i))/n!} \\ _Seiichi Manyama_, May 22 2019
%Y Row sums of A144385. Slice sums of A144626.
%Y The gift scenarios sequences when a gift can be stolen at most s times, for s = 1..9, are A001515, A144416, A144508, A144509, A149187, A281358, A281359, A281360, A281361.
%K nonn
%O 0,2
%A _David Applegate_ and _N. J. A. Sloane_, Dec 07 2008, Dec 17 2008