%I #50 Mar 31 2024 19:04:03
%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,0,1,1,0,0,1,0,1,1,1,0,1,0,1,0,1,0,2,0,1,1,0,1
%N Squares visited by a knight moving on a single-digit square-spiral numbered board where the knight moves to the smallest numbered unvisited square; the minimum distance from the origin is used if the square numbers are equal; the smallest spiral number ordering is used if the distances are equal.
%C This sequence uses the same board numbering as A326413, and like that sequence, if the next step encounters two or more squares with the same square number, it then chooses the square which is the closest to the original 0-squared origin. But if two or more squares are found which also have the same distance to the origin, then the square which was first drawn in the spiral numbering is chosen, i.e., the smallest standard spiral numbered square as in A316667.
%C The sequence is finite. After 1069 steps a square with the number 9 (standard spiral number = 473) is visited, after which all neighboring squares have been visited.
%C Sequence A326916(n) gives the number of the square visited at step n, i.e., its rank in the spiral, starting with 0, as illustrated, e.g., in A326413. The digit on that square, i.e., a(n) can be obtained through A007376, cf. formula. - _M. F. Hasler_, Oct 21 2019
%H Scott R. Shannon, <a href="/A326918/b326918.txt">Table of n, a(n) for n = 0..1069</a>
%H Eric Angelini, <a href="https://cinquantesignes.blogspot.com/2019/05/kneils-knumberphile-knight.html">Kneil's Knumberphile Knight</a>, Cinquante signes, May 04 2019.
%H M. F. Hasler, <a href="/wiki/Knight_tours">Knight tours</a>, OEIS wiki, Nov. 2019.
%H Scott R. Shannon, <a href="/A326918/a326918.png">Image showing the 1069 steps of the knight's path</a>. The green dot is the first square with number 0 and the red dot the last 1070th square with number 9. The later is surrounded by blue dots to show the eight occupied squares.
%H N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=RGQe8waGJ4w">The Trapped Knight</a>, Numberphile video (2019).
%F a(n) = A007376(A326916(n)). - _M. F. Hasler_, Oct 21 2019
%e The squares are numbered using single digits of the spiral number ordering as:
%e .
%e 2---2---2---1---2---0---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 If the knight has a choice of two or more squares in this spiral with the same number which also have the same distance from the origin, then the square with the minimum standard spiral number, as shown in A316667, is chosen.
%Y Cf. A326916, A326413; A316328, A316667; A326924, A326922; A328908, A328928; A328909, A328929; A328698.
%Y Cf. A174344, A274923, A296030 (coordinates of the square number n).
%K nonn,fini,full
%O 0,9
%A _Scott R. Shannon_, Oct 21 2019
|