OFFSET
1,9
COMMENTS
Take the standard counterclockwise square spiral starting at 0, as in A304586, but only write one digit at a time in the cells of the spiral: 0,1,2,3,4,5,6,7,8,9,1,0,1,1,1,2,...
Place a chess knight at cell 0. Move it to the lowest-numbered cell it can attack, and if there is a tie, move it to the cell closest (in Euclidean distance) to the start, and if there is still a tie, move to the left(*).
No cell can be visited more than once.
Inspired by the Trapped Knight video and A316667.
Just as for A316667, the sequence is finite. After a while, the knight has no unvisited squares it can reach, and the sequence ends with a(1217) = 4.
(*)Moving to the left means choose the point with the lowest x-coordinate. This leads to an unambiguous choice of tied squares only for the 'move left' case.
LINKS
Luca Petrone, Table of n, a(n) for n = 1..1217
Eric Angelini, Kneil's Knumberphile Knight, Cinquante signes, May 04 2019.
Eric Angelini, Kneil's Knumberphile Knight, Cinquante signes, May 04 2019. [Cached copy, pdf file, with permission]
M. F. Hasler, Knight tours, OEIS wiki, Nov. 2019.
N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019).
EXAMPLE
The digit-square spiral is
.
.
2---2---2---1---2---0---2 2
| | |
3 1---2---1---1---1 9 3
| | | | |
2 3 4---3---2 0 1 1
| | | | | | |
4 1 5 0---1 1 8 3
| | | | | |
2 4 6---7---8---9 1 0
| | | |
5 1---5---1---6---1---7 3
| |
2---6---2---7---2---8---2---9
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
N. J. A. Sloane, Oct 17 2019
EXTENSIONS
More terms from Luca Petrone
Corrected and extended by Eric Angelini, Oct 24 2019
STATUS
approved