OFFSET
0,2
COMMENTS
From Gus Wiseman, Sep 28 2022: (Start)
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:
(6,2) (1,2,5) (1,1,5,1) (1,1,1,1,4)
(2,2,4) (2,1,4,1) (1,1,2,1,3)
(3,2,3) (3,1,3,1) (1,1,3,1,2)
(4,2,2) (4,1,2,1) (1,1,4,1,1)
(5,2,1) (5,1,1,1) (2,1,1,1,3)
(2,1,2,1,2)
(2,1,3,1,1)
(3,1,1,1,2)
(3,1,2,1,1)
(4,1,1,1,1)
The following pertain to this interpretation:
- Allowing any alternating sum gives A013777 (compositions of 4n).
- A011782 counts compositions of n.
- A034871 counts compositions of 2n with alternating sum 2k.
- A097805 counts compositions by alternating (or reverse-alternating) sum.
- A345197 counts compositions by length and alternating sum.
(End)
LINKS
V. V. Kruchinin and D. V. Kruchinin, A Generating Function for the Diagonal T_{2n,n} in Triangles, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.6.
FORMULA
G.f.: A(x)=x*B'(x)/B(x), where B(x) if g.f. of A006632.
a(n) = Sum_{k=0..n}(binomial(n-1,n-k)*binomial(3*n,k)).
a(n) = 3*A224274(n), for n > 0. - Michel Marcus, Oct 12 2015
From Peter Bala, Nov 04 2015: (Start)
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)
a(n) = [x^n] 1/(1 - x)^(3*n). - Ilya Gutkovskiy, Oct 03 2017
From Peter Bala, Feb 14 2024: (Start)
a(n) = (-1)^n * binomial(-3*n, n).
a(n) = hypergeom([1 - 3*n, -n], [1], 1).
The g.f. A(x) satisfies A(x/(1 + x)^4) = 1/(1 - 3*x). (End)
a(n) = Sum_{k = 0..n} binomial(2*n+k-1, k)*binomial(2*n-k-1, n-k). - Peter Bala, Sep 16 2024
MATHEMATICA
Table[Binomial[4 n - 1, n], {n, 0, 40}] (* Vincenzo Librandi, Oct 06 2015 *)
PROG
(Maxima)
B(x):=sum(binomial(4*n-1, n-1)*3/(4*n-1)*x^n, n, 1, 30);
taylor(x*diff(B(x), x, 1)/B(x), x, 0, 20);
(Magma) [Binomial(4*n-1, n): n in [0..20]]; // Vincenzo Librandi, Oct 06 2015
(PARI) a(n) = binomial(4*n-1, n); \\ Michel Marcus, Oct 06 2015
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Vladimir Kruchinin, Oct 06 2015
STATUS
approved