login
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.
2
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,5
EXAMPLE
a(4) = 2: /\
/\/\/\/\ /\/ \/\ .
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);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 04 2024
STATUS
approved