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!)
A317782 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 #44 Mar 17 2024 05:18:24

%S 1,1,5,51,474,4329,43406,469565,5228459,59259957,686003702,8097484169,

%T 97005128492,1175916181703,14404685872773,178105648065109,

%U 2220134252592683,27872257776993240,352143374331177766,4474477933645201621,57147423819800882972

%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 Alois P. Heinz, <a href="/A317782/b317782.txt">Table of n, a(n) for n = 0..500</a>

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

%F a(n) ~ c * d^n / n^2, where d = (2 + 4/3^(3/4))^2 = 14.0982628380912972017512943055944... and c = 0.25546328221900708410379626465... - _Vaclav Kotesovec_, Mar 13 2019, updated Mar 17 2024

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

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

%p add(b(n-1, x-d[1], y-d[2]), 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..25);

%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, 25] (* _Jean-François Alcover_, May 13 2020, after Maple *)

%Y Cf. A199915, A306813.

%K nonn,walk

%O 0,3

%A _Alois P. Heinz_, Sep 24 2018

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 September 17 18:39 EDT 2024. Contains 375990 sequences. (Running on oeis4.)