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!)
A306813 Number of 2n-step paths from (0,0) to (0,n) that stay in the first quadrant (but may touch the axes) consisting of steps (-1,0), (0,1), (0,-1) and (1,-1). 3

%I #28 May 13 2020 10:38:49

%S 1,0,3,10,20,237,770,3944,28635,112360,744084,4381083,21579779,

%T 143815322,801165187,4578481584,29176623983,165772480380,

%U 1013147794546,6259309820475,36974951346176,230752749518819,1413352914731005,8618746801792237,53986291171211635

%N Number of 2n-step paths from (0,0) to (0,n) that stay in the first quadrant (but may touch the axes) consisting of steps (-1,0), (0,1), (0,-1) and (1,-1).

%H Vaclav Kotesovec, <a href="/A306813/b306813.txt">Table of n, a(n) for n = 0..1116</a> (terms 0..500 from Alois P. Heinz)

%F a(n) = A306814(2n,n).

%F a(n) ~ c * d^n / n^2, where d = 6.7004802541941947450873... and c = 0.5171899701803656646... - _Vaclav Kotesovec_, Apr 13 2019

%e a(0) = 1: [(0,0)].

%e a(2) = 3:

%e [(0,0), (0,1), (0,0), (0,1), (0,2)],

%e [(0,0), (0,1), (0,2), (0,1), (0,2)],

%e [(0,0), (0,1), (0,2), (0,3), (0,2)].

%e a(3) = 10:

%e [(0,0), (0,1), (1,0), (1,1), (1,2), (1,3), (0,3)],

%e [(0,0), (0,1), (0,2), (1,1), (1,2), (1,3), (0,3)],

%e [(0,0), (0,1), (0,2), (0,3), (1,2), (1,3), (0,3)],

%e [(0,0), (0,1), (0,2), (0,3), (0,4), (1,3), (0,3)],

%e [(0,0), (0,1), (1,0), (1,1), (1,2), (0,2), (0,3)],

%e [(0,0), (0,1), (0,2), (1,1), (1,2), (0,2), (0,3)],

%e [(0,0), (0,1), (0,2), (0,3), (1,2), (0,2), (0,3)],

%e [(0,0), (0,1), (1,0), (1,1), (0,1), (0,2), (0,3)],

%e [(0,0), (0,1), (0,2), (1,1), (0,1), (0,2), (0,3)],

%e [(0,0), (0,1), (1,0), (0,0), (0,1), (0,2), (0,3)].

%p b:= proc(n, x, y) option remember; `if`(min(n, x, y, n-x-y)<0, 0,

%p `if`(n=0, 1, add(b(n-1, x-d[1], y-d[2]),

%p d=[[-1, 0], [0, 1], [0, -1], [1, -1]])))

%p end:

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

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

%t b[n_, x_, y_] := b[n, x, y] = If[Min[n, x, y, n - x - y] < 0, 0, If[n == 0, 1, Sum[b[n - 1, x - d[[1]], y - d[[2]]], {d, {{-1, 0}, {0, 1}, {0, -1}, {1, -1}}}]]];

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

%t a /@ Range[0, 30] (* _Jean-François Alcover_, May 13 2020, after Maple *)

%Y Cf. A000108, A126596, A174687, A306814, A317782.

%K nonn,walk

%O 0,3

%A _Alois P. Heinz_, Mar 11 2019

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 18:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)