A343356 Squares visited by a knight moving on a square-spiral with numbers equal to the ordered prime factors of the positive integers and 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 ordered spiral number is used if the distances are equal.
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 5, 2, 2
Offset: 1
Examples
The square-spiral starts with 1 and is then numbered with the ordered prime factors of the positive integers as follows: . 11---5---2---3---3 . | | . 2 2---2---3 2 2 | | | | | 2 5 1---2 2 2 | | | | 3 2---3---7---2 2 | | 13---2---7---3---5---2 . a(1) = 1, the starting square of the knight. a(2) = 2. Four squares the knight can step to from the starting square are numbered 2, all of which are the same distance form the origin, so the 2 with the lowest spiral number is chosen. This is the 2 at coordinates (2,-1) relative to the starting square which has an ordered spiral number of 10. a(35) = 3. This is the first time a square greater than 2 is stepped to. The available squares after 33 steps are 3, 3, 3, 11, 5, and 47, and the 3 at coordinates (1,4) relative to the starting square is chosen because it is the closest number to that square. a(365) = 41. This is the largest numbered square that is stepped to. The available squares after the 363rd step are 41, 157, 313, and 43, and 41 is the smallest of these. a(370) = 3. This is the final square stepped to as no further unvisited square is available.
Links
- N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019).
- Scott R. Shannon, Image showing the 370 visited squares. The starting square is highlighted in white, the visited squares in yellow, the path is colored across the spectrum to show the relative step ordering, and the final square is highlighted in red.
Comments