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!)
A225042 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), H=(1,0) and S=(0,1). 7

%I #19 Sep 13 2021 08:32:14

%S 1,2,8,48,360,3088,28928,288208,3003952,32402384,359019952,4064452272,

%T 46829600704,547498996736,6480275672192,77511461858592,

%U 935562094075392,11381614588917296,139425068741674448,1718444636265140992,21295889048851102176,265200380258393530896

%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), H=(1,0) and S=(0,1).

%H Alois P. Heinz, <a href="/A225042/b225042.txt">Table of n, a(n) for n = 0..890</a>

%F a(n) ~ c * d^n / n^(3/2), where d = 1/6*(19009+153*sqrt(17))^(1/3) + 356/(3*(19009+153*sqrt(17))^(1/3)) + 14/3 = 13.56165398271839628518..., c = 0.03237684690282108810066870410351693504744294274892020985727414558915214336... - _Vaclav Kotesovec_, Sep 07 2014, updated Sep 13 2021

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

%e a(1) = 2: U, HS.

%e a(2) = 8: UU, HSU, UHS, HSHS, HUS, HHSS, UDSS, HSDSS.

%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, n):

%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, n];

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

%Y Cf. A006318 (without D-steps), A224769 (without H-steps), A224776 (without U-steps), A225041 (paths to (n,0)), A286765.

%K nonn

%O 0,2

%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 March 29 04:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)