A272773
Number of n-step self-avoiding nonintersecting walks on the square lattice with diagonals allowed (corresponds to using the Moore neighborhood).
Original entry on oeis.org
1, 8, 56, 360, 2240, 13696, 82808, 496656, 2961136, 17573608, 103911424, 612577272, 3602222736, 21137815952, 123811421128, 724064474968, 4228582808424
Offset: 0
-
# For starting point stp and list Ldir of n directions (1..8)
# construct the points of the whole path and count them.
# In order to avoid crossings consider the n midpoints, too.
# If there are 2*n+1 then the path is self-avoiding and uncrossed.
isNice := proc(Ldir) local Delta, dir, ep, mp, path;
Delta := [[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1]];
ep := [0,0]; path := {ep};
for dir in Ldir do
mp := ep + Delta[dir];
ep := mp + Delta[dir];
path := {op(path), mp, ep};
od;
return evalb(nops(path)=2*nops(Ldir)+1);
end:
# Count only king tours which are nice, i.e. self-avoiding and uncrossed.
A272773 := proc(n) local count, T, p;
count := 0:
T := combinat[cartprod]([seq([$1..8], j=1..n)]):
while not T[finished] do
p := T[nextvalue]();
if isNice(p) then count := count+1; fi;
od:
return count;
end: # Rainer Rosenthal, Jan 06 2019
-
mo = Most@Tuples[{-1, 1, 0}, 2]; a[0] = 1; a[tg_, p_: {{0, 0}}] := Block[{e, z = Last@p, w, mv = {}}, Do[w = {z+e, z+2*e}; If[Intersection[w, p] == {}, AppendTo[mv, w]], {e, mo}]; If[tg == 1, Length[mv], Sum[a[tg-1, Join[p, e]], {e, mv}]]]; a /@ Range[0, 7] (* Corrected following a suggestion by Rainer Rosenthal, Giovanni Resta, Jan 06 2019 *)
A323559
Number of rooted self-avoiding knight's paths of length n on an infinite chessboard with first move specified.
Original entry on oeis.org
1, 7, 49, 337, 2323, 15805, 107737, 727619, 4921655, 33056939, 222323989, 1487064391, 9957971965, 66391431607, 443085643919, 2946553003837, 19611967535129, 130149475953673
Offset: 1
A323141
Number of self-trapped uncrossed king's paths on an infinite board after n steps, reduced for symmetry.
Original entry on oeis.org
0, 0, 0, 0, 2, 19, 150, 1043, 6843, 43192, 266529, 1619983, 9746883, 58220994, 345919915
Offset: 1
a(5) = 2: There are 2 walks where the king is blocked after 5 steps, because for the diagonal moves it would have to cross its previous path.
.
o 2 o o 3 o
/ \ / \
/ \ / \
/ \ / \
3 5 1 4 - - - 5 2
| / / /
| / / /
| / / /
4 S o S - - - 1 o
A376609
a(n) is the numerator of the expected number of random moves of a chess king to reach a position outside an nXn chessboard, starting in one of the corners.
Original entry on oeis.org
1, 8, 72, 46, 23747, 94968, 12161644, 158536576, 165181795263, 1779861954248, 60921563004721184, 136512657826472304, 38548316743830620183051, 581371653539561314, 2630585854108441990301102856, 120104329127347395409698056, 5092493809189909792181005355935991197, 6666722670813237580783418910187983288
Offset: 1
1, 8/5, 72/35, 46/19, 23747/8723, 94968/31879, 12161644/3797647, 158536576/46627015, 165181795263/46174521031, ...
Approximately 1, 1.6, 2.057, 2.421, 2.722, 2.979, 3.202, 3.400, 3.577, 3.738, ...
A376610 are the corresponding denominators.
-
\\ Uses function droprob from A376606
kingmoves = [[1, 0], [0, 1], [0, -1], [-1, 0], [-1, -1], [-1, 1], [1, -1], [1, 1]];
a376609(n) = numerator(droprob(n,kingmoves,8))
A323561
Number of rooted self-avoiding king's walks of n moves on an infinite chessboard with first move specified.
Original entry on oeis.org
2, 14, 92, 584, 3644, 22482, 137626, 837466, 5072590, 30611376, 184171252, 1105262004, 6618842522, 39564403462, 236123357538, 1407249202976, 8376673823516
Offset: 1
Showing 1-5 of 5 results.
Comments