login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #13 May 23 2021 03:23:19

%S 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,

%T 28,11,27,85,126,87,54,29,30,55,88,129,56,31,58,93,57,90,131,89,130,

%U 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

%N 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.

%C 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.

%C 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.

%C 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.

%H Scott R. Shannon, <a href="/A344325/a344325.jpg">Image of the first 6000 steps</a>. 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.

%H Scott R. Shannon, <a href="/A344325/a344325.gif">Image of the first 1000000 steps</a>.

%e The board is numbered with the square spiral:

%e .

%e 17--16--15--14--13 .

%e | | .

%e 18 5---4---3 12 29

%e | | | | |

%e 19 6 1---2 11 28

%e | | | |

%e 20 7---8---9--10 27

%e | |

%e 21--22--23--24--25--26

%e .

%e 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.

%e a(11) = 25 as from the square 10 the square with 25 is only one unit away and shares no digit with 10.

%e 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.

%e 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.

%Y Cf. A296030, A174344, A274923, A067581, A330979, A332767.

%K nonn,base

%O 1,2

%A _Scott R. Shannon_ and _Eric Angelini_, May 15 2021