OFFSET
1,2
LINKS
Scott R. Shannon, Image of the first 1000 steps.. The colors are graduated across the spectrum to show the relative step order. The lowest unvisited square, 4, is marked with a yellow dot.
Scott R. Shannon, Image of the first 200000 steps.
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(2) = 11. There are three squares 2 units away from the starting square 1 that also contain the digit 1 - 11, 15, and 19. Of these 11 is the smallest so is the square stepped to.
a(3) = 10. Of the two adjacent squares to 11 that also contain the digit 1 the square 10 is the smallest.
a(4) = 12. This is the only unvisited square within 2 units of a(3) = 10 that also contains the digit 1.
a(12) = 39. This is the only unvisited square within sqrt(2) units of a(11) = 19 that contains either the digit 3 or 9. It is also the first square stepped to that does not share the digit 1 with the previous square.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon and Eric Angelini, May 16 2021
STATUS
approved