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 lattice paths from (0,0) to (n,n) that do not go below the x-axis or above the diagonal x=y and consist of steps U=(1,1), D=(1,-1) and S=(0,1).
4

%I #24 Dec 18 2020 12:02:06

%S 1,1,2,7,33,184,1142,7629,53750,394157,2981546,23117242,182867360,

%T 1470714606,11993628444,98967634147,824958769631,6937180941468,

%U 58785077008641,501520244718945,4304433733010962,37142428443486254,322042675618484973,2804409601249038670

%N Number of lattice paths from (0,0) to (n,n) that do not go below the x-axis or above the diagonal x=y and consist of steps U=(1,1), D=(1,-1) and S=(0,1).

%H Alois P. Heinz, <a href="/A224769/b224769.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) ~ c * d^n / n^(3/2), where d = 3/4*(71 + 8*sqrt(2))^(1/3) + 51/(4*(71 + 8*sqrt(2))^(1/3)) + 13/4 = 9.4435356015932520820011..., c = 0.00814413508604516738631686716788556507884786... . - _Vaclav Kotesovec_, Sep 07 2014

%e a(2) = 2: UDSS, UU.

%e a(3) = 7: UDSDSSS, UDUSS, UDSSDSS, UUDSS, UDSUS, UDSSU, UUU.

%p b:= proc(x, y) option remember; `if`(y>x, 0, `if`(x=0, 1,

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

%p end:

%p a:= n-> b(n, n):

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

%t b[x_, y_] := b[x, y] = If[y > x, 0, If[x == 0, 1, If[y > 0, b[x, y - 1] + b[x - 1, y - 1], 0] + b[x - 1, y + 1]]];

%t a[n_] := b[n, n];

%t a /@ Range[0, 30] (* _Jean-François Alcover_, Dec 18 2020, after _Alois P. Heinz_ *)

%Y Cf. A198324 (paths to (n,0)), A225042 (with additional H-steps), A286425.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Apr 17 2013