cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A344367 Squares visited on a spirally numbered board when stepping to the closest unvisited square that contains a number that shares one or more digits 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.

Original entry on oeis.org

1, 11, 10, 12, 13, 14, 15, 16, 17, 18, 19, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 3, 23, 22, 21, 20, 40, 41, 42, 43, 44, 45, 46, 47, 24, 25, 26, 27, 28, 29, 2, 52, 51, 50, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 59, 58, 57, 56, 55, 54, 53, 125, 124, 123, 122, 121, 120
Offset: 1

Views

Author

Scott R. Shannon and Eric Angelini, May 16 2021

Keywords

Examples

			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) = 11. There are three squares 2 units away from the starting square 1 that also contain the digit 1 - 11, 15, and 19. Of these 11 is the smallest so is the square stepped to.
a(3) = 10. Of the two adjacent squares to 11 that also contain the digit 1 the square 10 is the smallest.
a(4) = 12. This is the only unvisited square within 2 units of a(3) = 10 that also contains the digit 1.
a(12) = 39. This is the only unvisited square within sqrt(2) units of a(11) = 19 that contains either the digit 3 or 9. It is also the first square stepped to that does not share the digit 1 with the previous square.
		

Crossrefs