%I #50 Nov 16 2024 06:31:05
%S 1,3,21,165,1365,11628,100947,888030,7888725,70607460,635745396,
%T 5752004349,52251400851,476260169700,4353548972850,39895566894540,
%U 366395202809685,3371363686069236,31074067324187580,286845713747883300,2651487106659130740,24539426037817994160
%N a(n) = binomial(4*n-1,n).
%C From _Gus Wiseman_, Sep 28 2022: (Start)
%C Also the number of integer compositions of 4n with alternating sum 2n, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. These compositions are ranked by A348614. The a(12) = 21 compositions are:
%C (6,2) (1,2,5) (1,1,5,1) (1,1,1,1,4)
%C (2,2,4) (2,1,4,1) (1,1,2,1,3)
%C (3,2,3) (3,1,3,1) (1,1,3,1,2)
%C (4,2,2) (4,1,2,1) (1,1,4,1,1)
%C (5,2,1) (5,1,1,1) (2,1,1,1,3)
%C (2,1,2,1,2)
%C (2,1,3,1,1)
%C (3,1,1,1,2)
%C (3,1,2,1,1)
%C (4,1,1,1,1)
%C The following pertain to this interpretation:
%C - The case of partitions is A000712, reverse A006330.
%C - Allowing any alternating sum gives A013777 (compositions of 4n).
%C - A011782 counts compositions of n.
%C - A034871 counts compositions of 2n with alternating sum 2k.
%C - A097805 counts compositions by alternating (or reverse-alternating) sum.
%C - A103919 counts partitions by sum and alternating sum (reverse: A344612).
%C - A345197 counts compositions by length and alternating sum.
%C (End)
%H V. V. Kruchinin and D. V. Kruchinin, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Kruchinin/kruch9.html">A Generating Function for the Diagonal T_{2n,n} in Triangles</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.6.
%F G.f.: A(x)=x*B'(x)/B(x), where B(x) if g.f. of A006632.
%F a(n) = Sum_{k=0..n}(binomial(n-1,n-k)*binomial(3*n,k)).
%F a(n) = 3*A224274(n), for n > 0. - _Michel Marcus_, Oct 12 2015
%F From _Peter Bala_, Nov 04 2015: (Start)
%F The o.g.f. equals f(x)/g(x), where f(x) is the o.g.f. for A005810 and g(x) is the o.g.f. for A002293. More generally, f(x)*g(x)^k is the o.g.f. for the sequence binomial(4*n + k,n). Cf. A005810 (k = 0), A052203 (k = 1), A257633 (k = 2), A224274 (k = 3) and A004331 (k = 4). (End)
%F a(n) = [x^n] 1/(1 - x)^(3*n). - _Ilya Gutkovskiy_, Oct 03 2017
%F a(n) = A071919(3n-1,n+1) = A097805(4n,n+1). - _Gus Wiseman_, Sep 28 2022
%F From _Peter Bala_, Feb 14 2024: (Start)
%F a(n) = (-1)^n * binomial(-3*n, n).
%F a(n) = hypergeom([1 - 3*n, -n], [1], 1).
%F The g.f. A(x) satisfies A(x/(1 + x)^4) = 1/(1 - 3*x). (End)
%F a(n) = Sum_{k = 0..n} binomial(2*n+k-1, k)*binomial(2*n-k-1, n-k). - _Peter Bala_, Sep 16 2024
%t Table[Binomial[4 n - 1, n], {n, 0, 40}] (* _Vincenzo Librandi_, Oct 06 2015 *)
%o (Maxima)
%o B(x):=sum(binomial(4*n-1,n-1)*3/(4*n-1)*x^n,n,1,30);
%o taylor(x*diff(B(x),x,1)/B(x),x,0,20);
%o (Magma) [Binomial(4*n-1,n): n in [0..20]]; // _Vincenzo Librandi_, Oct 06 2015
%o (PARI) a(n) = binomial(4*n-1,n); \\ _Michel Marcus_, Oct 06 2015
%Y Cf. A006632, A002293, A004331, A005810, A052203, A224274, A257633.
%Y Cf. A000346, A000984, A001700, A002458, A025047, A058622, A081294, A294175.
%K nonn,easy,changed
%O 0,2
%A _Vladimir Kruchinin_, Oct 06 2015