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!)
A190425 Number of one-sided prudent walks from (0,0) to (n,n), with floor(n/2)+n east steps, floor(n/2) west steps and n north steps. 1

%I #36 Oct 21 2023 06:00:44

%S 1,2,12,60,700,3780,51744,288288,4247100,24066900,369881512,

%T 2118412296,33466634656,193076738400,3109838832000,18037065225600,

%U 294718130342460,1716299700229620,28355714001615000,165657066009435000,2761067350729888200,16171965911417916600

%N Number of one-sided prudent walks from (0,0) to (n,n), with floor(n/2)+n east steps, floor(n/2) west steps and n north steps.

%H Alois P. Heinz, <a href="/A190425/b190425.txt">Table of n, a(n) for n = 0..300</a>

%H S. Gao and H. Niederhausen, <a href="http://math.fau.edu/Niederhausen/HTML/Papers/Sequences%20Arising%20From%20Prudent%20Self-Avoiding%20Walks-February%2001-2010.pdf">Sequences Arising From Prudent Self-Avoiding Walks</a>, 2010.

%F a(n) ~ 2^(n + 1/2) * 3^(3*n/2 - (3 - (-1)^n)/4) / (Pi*n). - _Vaclav Kotesovec_, Oct 21 2023

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

%p b:= proc(i, w, no, e) option remember; `if`(-1 in {w, no, e}, 0,

%p `if`(no=0 and w=0 and e=0, 1, b(0, w, no-1, e)+

%p `if`(i<1, b(-1, w-1, no, e), 0)+`if`(i>-1, b(1, w, no, e-1), 0)))

%p end:

%p seq(a(n), n=0..20); # _Alois P. Heinz_, Jun 04 2011

%t a[n_] := b[0, Quotient[n, 2], n, Quotient[n, 2] + n]; b[i_, w_, no_, e_] := b[i, w, no, e] = If[MemberQ[{w, no, e}, -1], 0, If[no == 0 && w == 0 && e == 0, 1, b[0, w, no - 1, e] + If[i < 1, b[-1, w - 1, no, e], 0] + If[i > -1, b[1, w, no, e - 1], 0]]]; Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Oct 24 2016, after _Alois P. Heinz_ *)

%K nonn,walk

%O 0,2

%A _Shanzhen Gao_, May 10 2011

%E More terms from _Alois P. Heinz_, Jun 04 2011

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 10:44 EDT 2024. Contains 371268 sequences. (Running on oeis4.)