login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225041 Number of lattice paths from (0,0) to (n,0) that do not go below the x-axis or above the diagonal x=y and consist of steps U=(1,1), D=(1,-1), H=(1,0) and S=(0,1). 5

%I #18 May 14 2017 09:52:23

%S 1,1,3,9,35,145,659,3137,15619,80177,422595,2273633,12447667,69138193,

%T 388784259,2209440945,12671782579,73260414481,426545078627,

%U 2499059841249,14723542302627,87181150961361,518554078448339,3097007445391441,18565515801339827

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

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

%F a(n) ~ c * (3+2*sqrt(3))^n / n^(3/2), where c = 0.05641378816540215191327201376... . - _Vaclav Kotesovec_, Sep 07 2014

%e a(0) = 1: the empty path.

%e a(1) = 1: H.

%e a(2) = 3: HH, UD, HSD.

%e a(3) = 9: HHH, UDH, HSDH, UHD, HSHD, HUD, HHSD, UDSD, HSDSD.

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

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

%p end:

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

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

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

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

%t Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Mar 29 2017, translated from Maple *)

%Y Cf. A001006 (without S-steps), A114296 (without U-steps), A198324 (without H-steps), A225042 (paths to (n,n)), A286760.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Apr 25 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)