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”).
%I #23 Dec 28 2022 05:42:55
%S 1,1,2,4,9,22,57,155,435,1249,3645,10770,32143,96747,293359,895373,
%T 2748803,8483035,26302248,81896176,255967640,802790415,2525691721,
%U 7968972542,25209580699,79942927651,254077293876,809192984902,2582113984084,8254273128869
%N Number of nonnegative lattice paths from (0,0) to (n,0) using steps in {(1,-4), (1,-1), (1,0), (1,1)}.
%H Alois P. Heinz, <a href="/A348202/b348202.txt">Table of n, a(n) for n = 0..1907</a>
%H Alois P. Heinz, <a href="/A348202/a348202.gif">Animation of a(7) = 155 paths</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%F 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
%p b:= proc(x, y) option remember; `if`(y<0 or y>x, 0,
%p `if`(x=0, 1, add(b(x-1, y-j), j=[-4, -1, 0, 1])))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=0..31);
%t 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}}]]];
%t a[n_] := b[n, 0];
%t Table[a[n], {n, 0, 31}] (* _Jean-François Alcover_, Dec 28 2022, after _Alois P. Heinz_ *)
%Y Cf. A000108, A001006, A025235, A036765, A333069, A333105, A337067.
%K nonn,walk
%O 0,3
%A _Alois P. Heinz_, Oct 06 2021