OFFSET
1,1
COMMENTS
A self-avoiding walk on a square lattice allows horizontal and vertical movement one step at a time, where no space is visited more than once.
The n X n square can be seen as a subset of a larger lattice which surrounds it. Visiting any space on this larger lattice that is not part of the square constitutes escaping the square.
There are two ways to escape the square while standing at a corner, and both are counted separately.
a(n) is always even due to symmetry along a diagonal.
EXAMPLE
For n=1, every direction will immediately result in escaping the board, so a(1) = 4.
For n=2, there are two ways to escape from the starting corner. Otherwise, any of the three remaining corners can be escaped from in two ways, and each corner can be reached from two different directions (clockwise and counterclockwise). Therefore a(2) = 2 + 3*2*2 = 14.
CROSSREFS
KEYWORD
nonn,walk,more
AUTHOR
Johan Westin, May 05 2021
EXTENSIONS
a(7)-a(13) from Andrew Howroyd, May 05 2021
STATUS
approved