OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..400
Wikipedia, Counting lattice paths
MAPLE
b:= proc(x, y, h) option remember; `if`(x=0, h, add((t->
`if`(x>t, b(x-1, t, max(h, t)), 0))(y-j), j=-1-y..min(1, y)))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..33);
MATHEMATICA
b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[With[{t = y - j},
If[x > t, b[x - 1, t, Max[h, t]], 0]], {j, -1 - y, Min[1, y]}]];
a[n_] := b[n, 0, 0];
a /@ Range[0, 33] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 24 2020
STATUS
approved