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.

A362027 Squares visited by a knight moving on a square-spiral numbered board where the knight moves to a previously unvisited square with a number as close as possible to the number of the current square. If two such squares exist the smaller numbered square is chosen.

Original entry on oeis.org

1, 10, 3, 6, 9, 12, 15, 18, 7, 4, 11, 8, 5, 2, 13, 28, 25, 46, 21, 40, 17, 34, 59, 56, 29, 32, 55, 58, 33, 30, 53, 26, 47, 22, 19, 16, 37, 62, 95, 136, 91, 130, 87, 52, 49, 24, 27, 48, 51, 80, 83, 120, 123, 84, 81, 118, 77, 44, 41, 68, 103, 100, 63, 66, 39, 36, 61, 94, 57, 88, 127, 174, 229, 170
Offset: 1

Views

Author

Scott R. Shannon, Apr 05 2023

Keywords

Comments

This sequence is finite: after 130 squares have been visited the square with number 50 is reached after which all eight neighboring squares the knight could move to have already been visited. See the linked image. The largest visited square is a(117) = 247 while the smallest unvisited square is 20.

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(6) = 12 as after the knight moves to the square containing 9 the available unvisited squares are 4, 12, 22, 26, 28, 46, 48. Of these 12, where |12 - 9| = 3, is the closest number to 9. This is the first term to differ from A316667.
		

Crossrefs