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.

A371727 Number of Dyck paths of semilength n such that neighboring peaks differ in height by exactly one and first and last peak are at height one.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 0, 2, 2, 1, 5, 12, 16, 28, 65, 128, 237, 478, 990, 2006, 4086, 8469, 17644, 36826, 77305, 163195, 345798, 735302, 1569379, 3360821, 7218566, 15548176, 33578893, 72698472, 157755230, 343071238, 747603060, 1632264655, 3570221869, 7822430724
Offset: 0

Views

Author

Alois P. Heinz, Apr 05 2024

Keywords

Examples

			a(4) = 1:       /\
             /\/  \/\
.                                      /\
a(7) = 2:       /\    /\            /\/  \/\
             /\/  \/\/  \/\      /\/        \/\      .
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y, h, t) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, `if`(h>1, 0, 1), `if`(t=1 and abs(y-h)<>1, 0,
             b(x-1, y-1, `if`(t=1, y, h), 0))+b(x-1, y+1, h, 1)))
        end:
    a:= n-> b(2*n, 0$3):
    seq(a(n), n=0..50);
    # second Maple program:
    b:= proc(x,y) option remember; (t->
         `if`(x=t, 1, `if`(x `if`(n=0, 1, b(2*n-1, 1)):
    seq(a(n), n=0..50);

A371726 Number of Dyck paths of semilength n such that neighboring peaks differ in height by at most one and first and last peak are at height one.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 8, 17, 39, 93, 227, 567, 1447, 3760, 9917, 26492, 71567, 195256, 537397, 1490614, 4163508, 11702411, 33078992, 93986117, 268294604, 769171970, 2213834911, 6395017291, 18534987580, 53887644375, 157121564325, 459351495858, 1346290327899
Offset: 0

Views

Author

Alois P. Heinz, Apr 04 2024

Keywords

Examples

			a(4) = 2:                     /\
             /\/\/\/\      /\/  \/\      .
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y, h, t) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, `if`(h>1, 0, 1), `if`(t=1 and abs(y-h)>1, 0,
             b(x-1, y-1, `if`(t=1, y, h), 0))+b(x-1, y+1, h, 1)))
        end:
    a:= n-> b(2*n, 0$3):
    seq(a(n), n=0..32);
Showing 1-2 of 2 results.