OFFSET
0,3
COMMENTS
Is this the same sequence as A217823?
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..400
Wikipedia, Lattice path
FORMULA
a(n) = A217823(n) for n<=6.
EXAMPLE
a(0) = 1: (00), 0 steps are made.
a(1) = 1: (00)(11)(20)(10)(00).
a(2) = 9:
(00)(11)(20)(10)(00)(11)(20)(10)(00),
(00)(11)(20)(10)(21)(30)(20)(10)(00),
(00)(11)(20)(10)(21)(11)(20)(10)(00),
(00)(11)(20)(31)(40)(30)(20)(10)(00),
(00)(11)(20)(31)(21)(30)(20)(10)(00),
(00)(11)(20)(31)(21)(11)(20)(10)(00),
(00)(11)(22)(31)(40)(30)(20)(10)(00),
(00)(11)(22)(31)(21)(30)(20)(10)(00),
(00)(11)(22)(31)(21)(11)(20)(10)(00).
MAPLE
b:= proc(n, x, y) option remember; `if`(x+2*y>n, 0,
`if`(n=0, 1, `if`(y>0, b(n-1, x+1, y-1), 0)+
`if`(y<x, b(n-1, x-1, y), 0)+b(n-1, x+1, y+1)))
end:
a:= n-> b(4*n, 0$2):
seq(a(n), n=0..17);
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Jul 31 2023
STATUS
approved