%I #15 Jan 26 2020 01:07:00
%S 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,
%T 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,
%U 1,1,3,1,1,1,3,1,1,0,1,1,1,1,1,1,1,1,2,0
%N 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.
%C 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.
%C 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.
%H Scott R. Shannon, <a href="/A329171/a329171.png">Image showing the path of the 1209 steps</a>. 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.
%H N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=RGQe8waGJ4w">The Trapped Knight</a>, Numberphile video (2019).
%e The digit-square spiral is
%e .
%e .
%e 2---2---2---1---2---0---2 2
%e | | |
%e 3 1---2---1---1---1 9 3
%e | | | | |
%e 2 3 4---3---2 0 1 1
%e | | | | | | |
%e 4 1 5 0---1 1 8 3
%e | | | | | |
%e 2 4 6---7---8---9 1 0
%e | | | |
%e 5 1---5---1---6---1---7 3
%e | |
%e 2---6---2---7---2---8---2---9
%e .
%Y Cf. A326413, A316667.
%Y Differs from A326918 (e.g., by length).
%K nonn,fini,walk
%O 0,9
%A _Scott R. Shannon_, Nov 06 2019