login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A348202
Number of nonnegative lattice paths from (0,0) to (n,0) using steps in {(1,-4), (1,-1), (1,0), (1,1)}.
1
1, 1, 2, 4, 9, 22, 57, 155, 435, 1249, 3645, 10770, 32143, 96747, 293359, 895373, 2748803, 8483035, 26302248, 81896176, 255967640, 802790415, 2525691721, 7968972542, 25209580699, 79942927651, 254077293876, 809192984902, 2582113984084, 8254273128869
OFFSET
0,3
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 *)
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Oct 06 2021
STATUS
approved