A358021 Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that no number shares a digit with any of its eight surrounding neighbors.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 30, 44, 10, 55, 11, 20, 13, 66, 12, 33, 14, 22, 15, 23, 16, 24, 57, 18, 25, 36, 27, 48, 26, 34, 56, 47, 28, 50, 49, 58, 60, 29, 35, 67, 38, 40, 77, 59, 37, 19, 68, 39, 46, 70, 41, 80, 31, 65, 90, 17, 88, 21, 93, 51, 43, 69, 71, 32, 111, 73, 81, 64, 72, 89, 42, 91
Offset: 0
Examples
The square spiral begins: . . 13--20--11--55--10 36 | | | 66 4---3---2 44 25 | | | | | 12 5 0---1 30 18 | | | | 33 6---7---8---9 57 | | 14--22--15--23--16--24 . a(10) = 30 as when the tenth square is filled its surrounding neighbors are 1, 2, 8, 9, and 30 is the smallest unused number that does not contain those digits.
Comments