A039648
Number of n-step self-avoiding paths on the first octant of a 3-dimensional cubic lattice, starting at the origin.
Original entry on oeis.org
1, 3, 9, 33, 123, 489, 1947, 7977, 32817, 137253, 576993, 2452071, 10468245, 45032733, 194475321, 844608567, 3680153043, 16105438515, 70677344403, 311242931097, 1373860647453, 6081635195553
Offset: 0
A010567
Number of 2n-step self-avoiding closed paths (or cycles) on the 3-dimensional cubic lattice.
Original entry on oeis.org
6, 24, 264, 3312, 48240, 762096, 12673920, 218904768, 3891176352, 70742410800, 1309643747808, 24609869536800, 468270744898944, 9005391024862848, 174776445357365040, 3419171337633496704
Offset: 1
Cf.
A010568 (analog in 4 dimensions),
A010569 (in 5D),
A010570 (in 6D),
A130706 (in 1D),
A010566 (in 2D, different convention for n=1),
A002896 (closed walks, not necessarily self-avoiding),
A001412 (self-avoiding walks, not necessarily closed),
A039618,
A038515.
-
def A010567(n): # For illustration - becomes slow for n > 5
if not hasattr(A:=A010567, 'terms'):
A.terms=[6]; O=0,; A.paths=[(O*3, (1,)+O*2, t+O)for t in((2,0),(1,1))]
while n > len(A.terms):
for L in (0,1):
new = []; cycles = 0
for path in A.paths:
end = path[-1]
for i in (0,1,2):
for s in (1,-1):
t = tuple(end[j]if j!=i else end[j]+s for j in (0,1,2))
if t not in path: new.append(path+(t,))
elif L and t==path[0]: cycles += 24 if path[2][1] else 6
A.paths = new
A.terms.append(cycles)
return A.terms[n-1] # M. F. Hasler, Jun 17 2025
Name edited and "self-avoiding" added by
M. F. Hasler, Jun 17 2025
Showing 1-2 of 2 results.
Comments