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!)
A303478 Total number of nodes summed over all self-avoiding planar walks starting at (0,0), ending at (n,0), remaining in the first quadrant and using steps (0,1), (1,0), (1,1), (-1,1), and (1,-1) with the restrictions that (0,1) and (1,-1) are never used above the diagonal and (1,0) and (-1,1) are never used below the diagonal and (1,1) can only be used below the diagonal. 2
1, 2, 8, 26, 114, 439, 1932, 8100, 35943, 157300, 705592, 3160856, 14328020, 65101759, 297739250, 1365807037, 6291534200, 29062368336, 134648511026, 625312014415, 2910626302818, 13574639952187, 63425918284235, 296834615623188, 1391290575835806 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Wikipedia, Lattice path
MAPLE
b:= proc(x, y) option remember; (p-> p+[0, p[1]])(
`if`(x<0 or y<0, 0, `if`(x=0 and y=0, [1, 0],
`if`(x>y-2, b(x, y-1), 0)+`if`(x<y+2, b(x-1, y), 0)+
`if`(x>y, b(x-1, y-1), 0)+`if`(x<y-1, b(x+1, y-1), 0)+
`if`(x>y+1, b(x-1, y+1), 0))))
end:
a:= n-> b(n, 0)[2]:
seq(a(n), n=0..30);
MATHEMATICA
b[x_, y_] := b[x, y] = Function[p, p + {0, p[[1]]}][
If[x < 0 || y < 0, {0, 0}, If[x == 0 && y == 0, {1, 0},
If[x > y - 2, b[x, y - 1], {0, 0}] + If[x < y + 2, b[x - 1, y], 0] +
If[x > y, b[x - 1, y - 1], 0] + If[x < y - 1, b[x + 1, y - 1], 0] +
If[x > y + 1, b[x - 1, y + 1], 0]]]];
a[n_] := b[n, 0][[2]];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 02 2018, from Maple *)
CROSSREFS
Cf. A303477.
Sequence in context: A150680 A150681 A150682 * A150683 A150684 A150685
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Apr 24 2018
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 April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)