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”).

Number of 4n-step lattice paths starting and ending at (0,0) that do not go above the diagonal x=y or below the x-axis using steps in {(1,1), (1,-1), (-1,0)}.
2

%I #102 Aug 04 2023 10:13:35

%S 1,1,9,153,3579,101630,3288871,116951012,4465824585,180310624841,

%T 7614208325878,333613510494834,15075162152856423,699290488810583617,

%U 33176816563410874752,1605135467691243954419,79003021319962788395355,3947913343912428255683930

%N Number of 4n-step lattice paths starting and ending at (0,0) that do not go above the diagonal x=y or below the x-axis using steps in {(1,1), (1,-1), (-1,0)}.

%C Is this the same sequence as A217823?

%H Alois P. Heinz, <a href="/A361190/b361190.txt">Table of n, a(n) for n = 0..400</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path">Lattice path</a>

%F a(n) = A217823(n) for n<=6.

%e a(0) = 1: (00), 0 steps are made.

%e a(1) = 1: (00)(11)(20)(10)(00).

%e a(2) = 9:

%e (00)(11)(20)(10)(00)(11)(20)(10)(00),

%e (00)(11)(20)(10)(21)(30)(20)(10)(00),

%e (00)(11)(20)(10)(21)(11)(20)(10)(00),

%e (00)(11)(20)(31)(40)(30)(20)(10)(00),

%e (00)(11)(20)(31)(21)(30)(20)(10)(00),

%e (00)(11)(20)(31)(21)(11)(20)(10)(00),

%e (00)(11)(22)(31)(40)(30)(20)(10)(00),

%e (00)(11)(22)(31)(21)(30)(20)(10)(00),

%e (00)(11)(22)(31)(21)(11)(20)(10)(00).

%p b:= proc(n, x, y) option remember; `if`(x+2*y>n, 0,

%p `if`(n=0, 1, `if`(y>0, b(n-1, x+1, y-1), 0)+

%p `if`(y<x, b(n-1, x-1, y), 0)+b(n-1, x+1, y+1)))

%p end:

%p a:= n-> b(4*n, 0$2):

%p seq(a(n), n=0..17);

%Y Cf. A001006, A005789, A026945, A151332 (the same without condition on the diagonal), A217823, A359647.

%K nonn,walk

%O 0,3

%A _Alois P. Heinz_, Jul 31 2023