OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1907
Alois P. Heinz, Animation of a(7) = 155 paths
Wikipedia, Counting lattice paths
FORMULA
a(n) ~ c * d^n / n^(3/2), where d = 3.3640233336410979391691803264403704977... is the root of the equation 256*d^5 - 1280*d^4 + 960*d^3 + 2267*d^2 - 1324*d - 4112 = 0 and c = 0.710307351107763693658610320440791667652705027171696102847138... - Vaclav Kotesovec, Oct 24 2021
MAPLE
b:= proc(x, y) option remember; `if`(y<0 or y>x, 0,
`if`(x=0, 1, add(b(x-1, y-j), j=[-4, -1, 0, 1])))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..31);
MATHEMATICA
b[x_, y_] := b[x, y] = If[y < 0 || y > x, 0, If[x == 0, 1, Sum[b[x - 1, y - j], {j, {-4, -1, 0, 1}}]]];
a[n_] := b[n, 0];
Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Dec 28 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Oct 06 2021
STATUS
approved