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”).

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.
3
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,3
COMMENTS
The sequence is finite; after a(264) = 177 the square at coordinate (-8,-1) relative to the starting square is reached which has the four neighbors 177, 409, 256, 308. These numbers include all digits 0 to 9 so the next term does not exist. The largest used number is a(241) = 7777 while smallest unused number is 120.
EXAMPLE
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.
CROSSREFS
KEYWORD
nonn,base,fini
AUTHOR
STATUS
approved