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

A329171
Successive squares visited by a knight on the single-digit square spiral, with ties resolved by choosing the point to the left of the line from the knight's current position to the 0-squared origin.
1
0, 0, 1, 0, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 1, 1, 0, 2, 3, 2, 2, 1, 3, 1, 1, 1, 2, 2, 3, 2, 3, 1, 4, 3, 5, 6, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0
OFFSET
0,9
COMMENTS
This is a variation of sequence A326413 where, instead of taking the lowest x-coordinate of the two tied squares with the same board number and distance from the origin, the square is chosen which is to the left of a line, from the point-of-view of the knight looking toward the origin, drawn between the knight's current position and the 0-squared origin. Due to the two tied points being equidistant from the origin these two point will always be on opposite sides of this line, thus this choice is always unambiguous.
The sequence is finite as after 1209 steps a square with the number 9, with coordinates (-11,6) relative to the origin, is reached after which all eight surrounded squares have been visited.
LINKS
Scott R. Shannon, Image showing the path of the 1209 steps. The starting square is shown in green, and final square in red. The eight blocking squares are shown in blue. Each of the yellow squares are where the next step was decided from two tied squares by choosing the point left of the line between the current position and the origin; the pink square shows the chosen left square, and a gray square the ignored right square.
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
Differs from A326918 (e.g., by length).
Sequence in context: A087479 A263343 A326413 * A326918 A328698 A359936
KEYWORD
nonn,fini,walk
AUTHOR
Scott R. Shannon, Nov 06 2019
STATUS
approved