login
A344325
Squares visited on a spirally numbered board when stepping to the closest unvisited square which contains a number that shares no digit with the number of the current square. If two or more such squares are the same distance away the one with the smaller number is chosen.
6
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 25, 48, 79, 80, 49, 26, 51, 84, 125, 83, 50, 81, 52, 86, 53, 28, 11, 27, 85, 126, 87, 54, 29, 30, 55, 88, 129, 56, 31, 58, 93, 57, 90, 131, 89, 130, 92, 135, 94, 137, 95, 60, 33, 14, 32, 59, 13, 62, 35, 16, 34, 15, 36, 17, 38, 67, 104, 66, 37, 64, 99, 100, 65, 102
OFFSET
1,2
COMMENTS
The sequence is infinite as a number containing all ten decimal digits can never be stepped to thus there will always be a square containing a number which has digits not in the number of the current square.
The pattern of visited squares forms nine closely spaced concentric square rings, while these groups of nine have a larger gap of unvisited squares between them. See the linked images.
In the first one million steps the largest single step distance is ~480 units, from a(572017) = 627194 to a(572018) = 3055000. This is a step that jumps between the inner to most outer group of nine concentric rings. The largest single step difference between numbers is from a(721912) = 6951823 to a(721913) = 4404077, a change of 2547746. The smallest unvisited number in the first one million steps is 12, although the image shows the path revisits squares close to the origin after a large number of steps, so it is possible this and other small numbers will eventually be visited.
LINKS
Scott R. Shannon, Image of the first 6000 steps. The step colors are graduated across the spectrum from red to violet to show the relative step ordering. The starting square is shown as a white dot.
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) = 2 as from 1 there are four numbers one unit away, 2,4,6,8, none of which contain the digit 1, so of these the smallest is chosen, which is 2.
a(11) = 25 as from the square 10 the square with 25 is only one unit away and shares no digit with 10.
a(20) = 83 as the four squares one unit away from 125 have been visited or contain digits 1,2 or 5. The square with 83 is diagonally adjacent to 125 and is the first time a square more than one unit away is stepped to.
a(23) = 52, and is the first square stepped to that is not adjacent to the previous square, being three units away from 81. All closer squares have been either visited or contain a 1 or 8 in their number.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved