A024484 Duplicate of A007226.
2, 3, 10, 42, 198, 1001, 5304, 29070, 163438, 937365, 5462730, 32256120, 192565800
Offset: 2
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.
From _Petros Hadjicostas_, Jul 29 2020: (Start) We give some examples to illustrate the comment by _Sarah Selkirk_ about the total number of downs between the 1st and 2nd ups in a 2-Dyck path of length 4*(n+1). We denote by (+3) an up movement by a vector of (1,3) and by (-1) a down movement by a vector of (1,-1). We use powers to denote repetition of the same movement. (i) For n = 0, we have the following 2-Dyck path of length 4 that contributes to a(0) = 3: (+3)(-1)^3 (no 2nd up here) with a total of 3 downs after the 1st up. (ii) For n = 1, we have the following 2-Dyck paths of length 8 that contribute to a(1) = 6: (+3)(-1)(+3)(-1)^5, (+3)(-1)^2(+3)(-1)^4, and (+3)(-1)^3(+3)(-1)^3 with a contribution of 1 + 2 + 3 = 6 downs between the 1st and 2nd ups. (iii) For n = 2, we have the following 2-Dyck paths of length 12 that contribute to a(2) = 28: (+3)(-1)(+3)(-1)^i(+3)(-1)^(8-i) for i = 0..5, (+3)(-1)^2(+3)(-1)^i(+3)^(7-i) for i = 0..4, and (+3)(-1)^3(+3)(-1)^i(+3)(-1)^(6-i) for i = 0..3 with a contribution of 1 x 6 + 2 x 5 + 3 x 4 = 28 downs between the 1st and 2nd ups. (End)
[3*Binomial(4*n,n)/(n+1) : n in [0..25]]; // Wesley Ivan Hurt, Jul 27 2020
Table[3/(n+1) Binomial[4n,n],{n,0,30}] (* Harvey P. Dale, Nov 14 2013 *)
a(n)={3*binomial(4*n,n)/(n+1)} \\ Andrew Howroyd, May 08 2020
Array[(4/(# + 1))*Binomial[5 #, #] &, 28, 0] (* Michael De Vlieger, Apr 12 2023 *)
a(n) = (4/(n+1)) * binomial(5*n,n); \\ Michel Marcus, May 08 2020
For n = 1, the 2_1-Dyck paths are UDD, DUD. This corresponds to a(1) = 2 + 1 = 3 down steps between the 1st up step and the end of the path. For n = 2, the 2_1-Dyck paths are UUDDDD, UDUDDD, UDDUDD, UDDDUD, DUDDUD, DUDUDD, DUUDDD. In total, there are a(2) = 0 + 1 + 2 + 3 + 2 + 1 + 0 = 9 down steps between the 1st and 2nd up step.
a[0] = 0; a[n_] := 2 * Binomial[3*n, n]/(n + 1) - Binomial[3*n + 1, n]/(n + 1) + 4 * Binomial[3*(n - 1), n - 1]/n - 2 * Boole[n == 1]; Array[a, 24, 0] (* Amiram Eldar, May 09 2020 *)
a(n) = if (n==0, 0, 2*binomial(3*n, n)/(n+1) - binomial(3*n+1, n)/(n+1) + 4*binomial(3*(n-1), n-1)/n - 2*(n==1)); \\ Michel Marcus, May 09 2020
For n = 2, the 3-Dyck paths are UDDDUDDD, UDDUDDDD, UDUDDDDD, UUDDDDDD. In total, there are a(2) = 3 + 4 + 5 + 6 = 18 down steps between the 2nd up step and the end of the path.
[3*sum([binomial(4*j + 1, j)*binomial(4*(n - j), n - j)/(4*j + 1)/(n - j + 1) for j in srange(1, 3)]) if n > 1 else 0 for n in srange(30)] # Benjamin Hackl, May 12 2020
For n = 1, the 3_1-Dyck paths are UDDD, DUDD. This corresponds to a(1) = 3 + 2 = 5 down steps between the 1st up step and the end of the path. For n = 2, the 3_1-Dyck paths are DUDDDUDD, DUDDUDDD, DUDUDDDD, DUUDDDDD, UDDDDUDD, UDDDUDDD, UDDUDDDD, UDUDDDDD, UUDDDDDD. In total, there are a(2) = 3 + 2 + 1 + 0 + 4 + 3 + 2 + 1 + 0 = 16 down steps between the 1st and 2nd up step.
a[0] = 0; a[n_] := 3 * Binomial[4*n, n]/(n + 1) - 2 * Binomial[4*n + 1, n]/(n + 1) + 6 * Binomial[4*(n - 1), n - 1]/n - 2 * Boole[n == 1]; Array[a, 22, 0] (* Amiram Eldar, May 12 2020 *)
[3*binomial(4*n, n)/(n+1) - 2*binomial(4*n+1, n)/(n+1) + 6*binomial(4*(n-1), n-1)/n - 2*(n==1) if n > 0 else 0 for n in srange(30)] # Benjamin Hackl, May 12 2020
a := proc(n) option remember; if n = 0 then 2 else 3*(3*n-1)*(3*n-2)/ (n+1)^2*a(n-1) end if; end proc: seq(a(n), n = 0..20);
For n = 2, there are the 2-Dyck paths UUDDDD, UDUDDD, UDDUDD. Between the 2nd up step and the end of the path there are a(2) = 4 + 3 + 2 = 9 down steps in total.
b:= proc(x, y, u, c) option remember; `if`(x=0, c, `if`(y+20, b(x-1, y-1, u, c+`if`(u=2, 1, 0)), 0)) end: a:= n-> b(3*n, 0$3): seq(a(n), n=0..24); # Alois P. Heinz, May 09 2020 # second Maple program: a:= proc(n) option remember; `if`(n<3, [0$2, 9][n+1], (3*(n-1)*(3*n-8)*(3*n-7)*(13*n-20)*a(n-1))/ (2*(13*n-33)*(n-2)*(2*n-3)*n)) end: seq(a(n), n=0..24); # Alois P. Heinz, May 09 2020
a[0] = a[1] = 0; a[n_] := 2 * Sum[Binomial[3*j + 1, j] * Binomial[3*(n - j), n - j]/((3*j + 1)*(n - j + 1)), {j, 1, 2}]; Array[a, 25, 0] (* Amiram Eldar, May 09 2020 *)
a(n) = if (n<=1, 0, 2*sum(j=1, 2, binomial(3*j+1,j) * binomial(3*(n-j),n-j)/((3*j+1)*(n-j+1)))); \\ Michel Marcus, May 09 2020
For n = 3, there is no 4th up step, a(3) = 118 enumerates the total number of down steps between the 3rd up step and the end of the path.
a[0] = a[1] = a[2] = 0; a[n_] := 3 * Sum[Binomial[4*j + 1, j] * Binomial[4*(n - j), n - j]/((4*j + 1)*(n - j + 1)), {j, 1, 3}]; Array[a, 22, 0] (* Amiram Eldar, May 12 2020 *)
[3*sum([binomial(4*j + 1, j)*binomial(4*(n - j), n - j)/(4*j + 1)/(n - j + 1) for j in srange(1, 4)]) if n > 2 else 0 for n in srange(30)] # Benjamin Hackl, May 12 2020
Comments