OFFSET
1,2
COMMENTS
The movement on the board in this sequence is restricted to the unvisted diagonally adjacent squares, like a chess bishop but with only one square moves.
The sequence is finite. After 27 steps the square with number 9 is visited, after which all four neighboring squares have been visited.
Due to the paths preference for squares with the fewest divisors it will move to a prime numbered square when possible, and the lowest prime if two or more unvisited primes are in neighboring squares. Of the 27 visited squares 20 contain prime numbers while only 7 contain composites. The largest visited square is a(13) = 251.
LINKS
Scott R. Shannon, Image showing the 27 steps of the path. A green dot marks the starting 1 square and a red dot the final square with number 9. The red dot is surrounded by four blue dots to show the occupied neighboring squares. A yellow dots marks the smallest unvisited square with number 2.
EXAMPLE
The board is numbered with the square spiral:
.
17--16--15--14--13 .
| | .
18 5---4---3 12 29
| | | | |
19 6 1---2 11 28
| | | |
20 7---8---9--10 27
| |
21--22--23--24--25--26
.
a(1) = 1, the starting square of the walk.
a(2) = 3. The four unvisited diagonally adjacent squares around a(1) are numbered 3,5,7,9. Of these 3,5,7 have only two divisors, and 3 is the lowest of those.
a(3) = 11. The three unvisited diagonally adjacent squares around a(2) are numbered 11,13,15. Of these 11 and 13 have only two divisors, and 11 is the lowest of those.
CROSSREFS
KEYWORD
nonn,walk,fini,full
AUTHOR
Scott R. Shannon, Jun 29 2020
STATUS
approved