This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A144385 #11 Jan 30 2017 21:16:51 %S A144385 1,0,1,1,1,0,0,1,3,7,10,10,0,0,0,1,6,25,75,175,280,280,0,0,0,0,1,10, %T A144385 65,315,1225,3780,9100,15400,15400,0,0,0,0,0,1,15,140,980,5565,26145, %U A144385 102025,323400,800800,1401400,1401400,0,0,0,0,0,0,1,21,266,2520,19425,125895,695695,3273270,12962950,42042000,106506400,190590400,190590400 %N A144385 Triangle read by rows: T(n,k) is the number of partitions of [1, 2, ..., k] into exactly n blocks, each of size 1, 2 or 3 (n >= 0, 0 <= k <= 3n). %C A144385 Row n has 3n+1 entries. %H A144385 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, 2017. %H A144385 David Applegate and N. J. A. Sloane, <a href="http://arxiv.org/abs/0907.0513">The Gift Exchange Problem</a> (arXiv:0907.0513, 2009) %F A144385 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). %F A144385 E.g.f.: Sum_{ n >= 0, k >= 0 } T(n, k) y^n x^k / k! = exp( y*(x+x^2/2+x^3/6) ). That is, the coefficient of y^n is the e.g.f. for row n. E.g. the e.g.f. for row 2 is (1/2)*(x+x^2/2+x^3/6)^2 = 1*x^2/2! + 3*x^3/3! + 7*x^4/4! + 10*x^5/5! + 10*x^6/6!. %e A144385 Triangle begins: %e A144385 [1] %e A144385 [0, 1, 1, 1] %e A144385 [0, 0, 1, 3, 7, 10, 10] %e A144385 [0, 0, 0, 1, 6, 25, 75, 175, 280, 280] %e A144385 [0, 0, 0, 0, 1, 10, 65, 315, 1225, 3780, 9100, 15400, 15400] %e A144385 [0, 0, 0, 0, 0, 1, 15, 140, 980, 5565, 26145, 102025, 323400, 800800, 1401400, 1401400] %p A144385 T := proc(n, k) %p A144385 option remember; %p A144385 if n = k then 1; %p A144385 elif k < n then 0; %p A144385 elif n < 1 then 0; %p A144385 else T(n - 1, k - 1) + (k - 1)*T(n - 1, k - 2) + 1/2*(k - 1)*(k - 2)*T(n - 1, k - 3); %p A144385 end if; %p A144385 end proc; %p A144385 for n from 0 to 12 do lprint([seq(T(n,k),k=0..3*n)]); od: %t A144385 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; Table[t[n, k], {n, 0, 12}, {k, 0, 3*n}] // Flatten (* _Jean-François Alcover_, Jan 14 2014 *) %Y A144385 See A144399, A144402, A144417, A111246 for other versions of this triangle. %Y A144385 Column sums give A001680, row sums give A144416. Taking last nonzero entry in each row gives A025035. %Y A144385 Diagonals include A000217, A001296, A027778, A144516; also A025035. %Y A144385 A generalization of the triangle in A144331 (and in several other entries). %Y A144385 Cf. A144643. %K A144385 nonn,tabf %O A144385 0,9 %A A144385 _David Applegate_ and _N. J. A. Sloane_, Dec 07 2008, Dec 17 2008