OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1671
Wikipedia, Counting lattice paths
FORMULA
a(n) ~ c * 4^n / n^(3/2), where c = 0.03828240225265266504281697555169550706277641504396262520878537702016362... - Vaclav Kotesovec, Oct 24 2020
MAPLE
b:= proc(x, y) option remember; `if`(x=0, 1, add(add(
b(x-h, y-v), h=1..min(x-y+v, max(1, y-v))), v=-1..min(y, 1)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..30);
MATHEMATICA
b[x_, y_] := b[x, y] = If[x == 0, 1, Sum[Sum[
b[x-h, y-v], {h, 1, Min[x-y+v, Max[1, y-v]]}], {v, -1, Min[y, 1]}]];
a[n_] := b[n, 0];
a /@ Range[0, 30] (* Jean-François Alcover, Dec 22 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 12 2020
STATUS
approved