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.

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.

This page as a plain text file.
%I A371727 #28 Apr 25 2024 09:11:15
%S A371727 1,1,0,0,1,0,0,2,2,1,5,12,16,28,65,128,237,478,990,2006,4086,8469,
%T A371727 17644,36826,77305,163195,345798,735302,1569379,3360821,7218566,
%U A371727 15548176,33578893,72698472,157755230,343071238,747603060,1632264655,3570221869,7822430724
%N 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.
%H A371727 Alois P. Heinz, <a href="/A371727/b371727.txt">Table of n, a(n) for n = 0..2764</a>
%H A371727 Alois P. Heinz, <a href="/A371727/a371727.gif">Animation of a(16)=237 paths</a>
%H A371727 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%e A371727 a(4) = 1:       /\
%e A371727              /\/  \/\
%e A371727 .                                      /\
%e A371727 a(7) = 2:       /\    /\            /\/  \/\
%e A371727              /\/  \/\/  \/\      /\/        \/\      .
%p A371727 b:= proc(x, y, h, t) option remember; `if`(y<0 or y>x, 0,
%p A371727       `if`(x=0, `if`(h>1, 0, 1), `if`(t=1 and abs(y-h)<>1, 0,
%p A371727          b(x-1, y-1, `if`(t=1, y, h), 0))+b(x-1, y+1, h, 1)))
%p A371727     end:
%p A371727 a:= n-> b(2*n, 0$3):
%p A371727 seq(a(n), n=0..50);
%p A371727 # second Maple program:
%p A371727 b:= proc(x,y) option remember; (t->
%p A371727      `if`(x=t, 1, `if`(x<t, 0, b(x-1-2*y, y+1)+add(add(
%p A371727         b(x-1-2*i, y+j), j=[-1, 1]), i=1..y-1))))(3*y-2)
%p A371727     end:
%p A371727 a:= n-> `if`(n=0, 1, b(2*n-1, 1)):
%p A371727 seq(a(n), n=0..50);
%Y A371727 Cf. A000108, A371705, A371726, A371926.
%K A371727 nonn
%O A371727 0,8
%A A371727 _Alois P. Heinz_, Apr 05 2024