cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A334640 a(n) is the total number of down steps between the 2nd and 3rd up steps in all 2-Dyck paths of length 3*n. A 2-Dyck path is a nonnegative lattice path with steps (1, 2), (1, -1) that starts and ends at y = 0.

Original entry on oeis.org

0, 0, 9, 19, 72, 324, 1595, 8307, 44982, 250648, 1427679, 8274825, 48644310, 289334160, 1738043892, 10529070020, 64252519830, 394601627376, 2437058926871, 15126463230165, 94306717535940, 590318477063700, 3708527622652755, 23374587898663155, 147770791807427880
Offset: 0

Views

Author

Benjamin Hackl, May 07 2020

Keywords

Comments

For n = 2, there is no 3rd up step, a(2) = 9 enumerates the total number of down steps between the 2nd up step and the end of the path.

Examples

			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.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)
  • PARI
    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

Formula

a(0) = a(1) = 0 and a(n) = 2*Sum_{j=1..2} binomial(3*j+1,j) * binomial(3*(n-j),n-j) / ((3*j+1)*(n-j+1)) for n > 1.

A334646 a(n) is the total number of down steps between the 3rd and 4th up steps in all 3-Dyck paths of length 4*n.

Original entry on oeis.org

0, 0, 0, 118, 409, 2368, 15750, 112716, 845295, 6551208, 52035714, 421286280, 3463401007, 28832656408, 242565115858, 2058945519936, 17611312647075, 151647023490480, 1313460091978458, 11435310622320552, 100019000856225156, 878443730199290560
Offset: 0

Views

Author

Benjamin Hackl, May 12 2020

Keywords

Comments

A 3-Dyck path is a nonnegative lattice path with steps (1, 3), (1, -1) that starts and ends at y = 0.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • SageMath
    [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

Formula

a(0) = a(1) = a(2) = 0 and a(n) = 3*Sum_{j=1..3} binomial(4*j+1, j)*binomial(4*(n-j), n-j)/((4*j+1)*(n-j+1)) for n > 2.
Showing 1-2 of 2 results.