The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A151348 Number of walks within N^2 (the first quadrant of Z^2) starting and ending at (0,0) and consisting of n steps taken from {(-1, -1), (-1, 0), (-1, 1), (0, -1), (1, 0)}. 1
1, 0, 1, 1, 4, 7, 25, 64, 201, 612, 1961, 6355, 21026, 70968, 241810, 837191, 2925393, 10334302, 36813216, 132242756, 478470272, 1742816732, 6387201912, 23539830561, 87207544029, 324627673245, 1213820275167, 4557447698656, 17177881979810, 64981216839823, 246648317043660, 939184339480746, 3586940782960596 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
A. Bostan, K. Raschel, and B. Salvy, Non-D-finite excursions in the quarter plane, J. Comb. Theory A 121 (2014) 45-63, Table 1 Tag 21, Tag 33.
M. Bousquet-Mélou and M. Mishna, 2008. Walks with small steps in the quarter plane, ArXiv 0810.4387.
MAPLE
Steps:= [[-1, -1], [-1, 0], [-1, 1], [0, -1], [1, 0]]:
f:= proc(n, p) option remember; local t, s;
if max(p) > n then return 0 fi;
add(procname(n-1, s), s = select(t -> min(t)>=0, map(`+`, Steps, p)))
end proc:
f(0, [0, 0]):= 1:
map(f, [$0..40], [0, 0]); # Robert Israel, Nov 20 2023
MATHEMATICA
aux[i_Integer, j_Integer, n_Integer] := Which[Min[i, j, n] < 0 || Max[i, j] > n, 0, n == 0, KroneckerDelta[i, j, n], True, aux[i, j, n] = aux[-1 + i, j, -1 + n] + aux[i, 1 + j, -1 + n] + aux[1 + i, -1 + j, -1 + n] + aux[1 + i, j, -1 + n] + aux[1 + i, 1 + j, -1 + n]]; Table[aux[0, 0, n], {n, 0, 25}]
CROSSREFS
Sequence in context: A073218 A276288 A219700 * A211942 A110413 A075686
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
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 June 3 09:48 EDT 2024. Contains 373057 sequences. (Running on oeis4.)