|
|
A303477
|
|
Number of 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, 1, 2, 5, 16, 51, 186, 675, 2619, 10222, 41278, 168322, 699654, 2936170, 12472461, 53415773, 230718087, 1003219186, 4390238536, 19317023478, 85423978859, 379448391283, 1692394492863, 7576241773049, 34031365237595, 153338751409238, 692894165597139
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
MAPLE
|
b:= proc(x, y) option remember; `if`(x<0 or y<0, 0,
`if`(x=0 and y=0, 1, `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):
seq(a(n), n=0..30);
|
|
MATHEMATICA
|
b[x_, y_] := b[x, y] = If[x < 0 || y < 0, 0,
If[x == 0 && y == 0, 1, 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]]];
a[n_] := b[n, 0];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,walk
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|