%I #23 Apr 22 2026 16:38:12
%S 1,2,6,22,92,402,1832,8453,39640,186296,881147,4162866,19721230,
%T 93250730,441549914,2086950250,9872284420,46627034590,220354970198,
%U 1040000436047,4910777435839,23162527440081,109292500313185,515214985932766
%N Number of self-avoiding walks on the cubic lattice with the first three orthogonal steps specified (see Comments).
%C The first step is in the +x direction, the first orthogonal step is in the +y direction, and the first step orthogonal to both x and y is in the +z direction.
%C Any walk on a cubic lattice (A001412) can be rotated and reflected such that these properties are satisfied. This provably represents an approximate 48-fold reduction in number (useful for exhaustively computing properties of the walks) and is analogous to A046171 on the square lattice.
%F a(n) = (A001412(n) + 24*A046171(n) + 18) / 48.
%e There are 30 SAWs of length 2 (6 straight and 24 bent), but they can all be rotated such that the first step is in the +x direction, reducing the count to 5. Of these 5, one is straight and four are bent. The four bent walks can all be rotated such that their second step is in the +y direction, leaving the count at 2.
%o (Python)
%o import numpy as np
%o from copy import copy
%o nmax=10
%o count=[1, 2]
%o allwalks=[]
%o lap=lambda f,*l: list(map(f,*l))
%o allwalks.append(np.array([1, 0, 0]))
%o allwalks.append(np.array([[[1, 0, 0], [1, 1, 0]], [[1, 0, 0], [2, 0, 0]]]))
%o for n in range(2, nmax):
%o template=allwalks[n-1]
%o counter=0
%o walks=[]
%o for t in template:
%o prewalk=np.array(t, dtype=int)
%o ytrig=np.max(prewalk[:, 1])>0
%o ztrig=np.max(prewalk[:, 2])>0
%o grid=np.zeros([2*nmax+2]*3)
%o prewalk+=nmax+1
%o grid[*3*[nmax+1]]=1
%o for j in range(n):
%o grid[prewalk[j, 0], prewalk[j, 1], prewalk[j, 2]]=1
%o opts=[]
%o ep=[prewalk[-1, 0], prewalk[-1, 1], prewalk[-1, 2]]
%o for i in range(6):
%o epp=copy(ep)
%o epp[i//2]+=(-1)**i
%o if grid[*epp]==0 and (i<3 or ytrig and (i<5 or ztrig)):
%o opts.append(epp)
%o for o in opts:
%o counter+=1
%o walk=np.zeros([n+1, 3])
%o walk[0:-1, :]=prewalk-[nmax+1]*3
%o walk[-1, :]=np.array(o)-[nmax+1]*3
%o walks.append(walk)
%o allwalks.append(walks)
%o count.append(counter)
%o print(count)
%Y Cf. A046171, A001412, A078717.
%K nonn,walk
%O 1,2
%A _Alex Klotz_, Mar 17 2026