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
1, 2, 12, 60, 700, 3780, 51744, 288288, 4247100, 24066900, 369881512, 2118412296, 33466634656, 193076738400, 3109838832000, 18037065225600, 294718130342460, 1716299700229620, 28355714001615000, 165657066009435000, 2761067350729888200, 16171965911417916600 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
S. Gao and H. Niederhausen, Sequences Arising From Prudent Self-Avoiding Walks, 2010.
FORMULA
a(n) ~ 2^(n + 1/2) * 3^(3*n/2 - (3 - (-1)^n)/4) / (Pi*n). - Vaclav Kotesovec, Oct 21 2023
MAPLE
a:= n-> b(0, iquo(n, 2), n, iquo(n, 2)+n):
b:= proc(i, w, no, e) option remember; `if`(-1 in {w, no, e}, 0,
`if`(no=0 and w=0 and 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)))
end:
seq(a(n), n=0..20); # Alois P. Heinz, Jun 04 2011
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A362244 A362238 A372986 * A145630 A082688 A099996
KEYWORD
nonn,walk
AUTHOR
Shanzhen Gao, May 10 2011
EXTENSIONS
More terms from Alois P. Heinz, Jun 04 2011
STATUS
approved

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 August 4 04:17 EDT 2024. Contains 374905 sequences. (Running on oeis4.)