OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2031
Alois P. Heinz, Animation of a(9)=93 paths
Wikipedia, Counting lattice paths
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