OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..430
Axel Bacher, Progressive and rushed Dyck paths, arXiv:2403.08120 [math.CO], 2024. See p. 7.
Alois P. Heinz, Animation of a(9) = 95 paths
Wikipedia, Counting lattice paths
EXAMPLE
a(4) = 2: /\
/\/\/\/\ /\/ \/\ .
a(5) = 4: /\ /\ /\/\
/\/\/\/\/\ /\/\/ \/\ /\/ \/\/\ /\/ \/\ .
MAPLE
b:= proc(x, y, k, h, t) option remember; `if`(x=0, `if`(h<2, 1, 0),
`if`(y<=k and y<x-1, b(x-1, y+1, k, h, 1), 0) +`if`(y>0,
b(x-1, y-1, max(y, k), `if`(t=1 and h<=y+1, y, h), 0), 0))
end:
a:= n-> b(2*n, 0$4):
seq(a(n), n=0..35);
MATHEMATICA
b[x_, y_, k_, h_, t_] := b[x, y, k, h, t] = If[x == 0, If[h < 2, 1, 0], If[y <= k && y < x - 1, b[x - 1, y + 1, k, h, 1], 0] + If[y > 0, b[x - 1, y - 1, Max[y, k], If[t == 1 && h <= y + 1, y, h], 0], 0]];
a[n_] := b[2n, 0, 0, 0, 0];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 01 2018, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 31 2017
STATUS
approved