login
Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that no number shares a digit with any of its four orthogonally adjacent neighbors.
1

%I #11 Nov 04 2022 07:32:46

%S 0,1,2,3,4,5,6,7,8,9,20,11,22,10,24,13,25,16,23,14,26,15,28,17,30,12,

%T 33,18,27,19,32,40,29,31,42,36,21,34,50,41,35,44,37,45,38,46,39,47,53,

%U 48,55,49,52,43,56,70,51,60,57,61,54,63,58,64,59,66,71,62,73,68,72,65,74,69,77,90,75

%N Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that no number shares a digit with any of its four orthogonally adjacent neighbors.

%C This sequence is similar to A358021 except here only the four orthogonally adjacent neighbors are considered. It is unknown if the sequence eventually terminates; if it does, it does so after more than 1.5 million terms. In that range on numerous occasions the only available number is one containing only the digit 7. For example a(862833) = 7...7, where there are forty-nine 7's.

%H Scott R. Shannon, <a href="/A358129/a358129.png">Image of the first 500000 terms</a>. The values are scaled across the spectrum from red to violet, with the value ranges increasing towards the violet end to give more color weighting to the larger numbers.

%e The square spiral begins:

%e .

%e .

%e 25--13--24--10--22 19

%e | | |

%e 16 4---3---2 11 27

%e | | | | |

%e 23 5 0---1 20 18

%e | | | |

%e 14 6---7---8---9 33

%e | |

%e 26--15--28--17--30--12

%e .

%e a(10) = 20 as when the tenth cell is filled its two orthogonal neighbors use the digits 1 and 9, and 20 is the smallest unused number that does not contain either of those digits.

%Y Cf. A358021, A358048, A344325, A344367, A354111, A343530.

%K nonn,base

%O 0,3

%A _Scott R. Shannon_ and _Eric Angelini_, Oct 30 2022