OFFSET
1,2
COMMENTS
This sequences gives the numbers of the squares visited by a knight moving on a square-spiral numbered board where at each step the knight moves to the unvisited neighbor one knight-leap away which contains the number with the smallest digit sum. If two or more neighbors exist with the same digit sum then from those squares the one with the lowest number is chosen.
The sequence is finite. After 790 steps the square with number 69 is visited, after which all eight neighboring squares have been visited. The largest visit spiral number is a(626) = 6112, while there are four squares with the largest visited digit sum of 19: a(373) = 2683, a(539) = 2737, a(590) = 2944, a(594) = 2728.
LINKS
Scott R. Shannon, Image showing the 791 visited squares. The starting square is highlighted in white, the visited squares in yellow, the final square in red, while the path is colored across the spectrum to show the relative step ordering.
N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019).
EXAMPLE
The board is numbered with the square spiral:
.
17--16--15--14--13 .
| | .
18 5---4---3 12 29
| | | | |
19 6 1---2 11 28
| | | |
20 7---8---9--10 27
| |
21--22--23--24--25--26
.
a(2) = 10 as the eight unvisited neighbors of the square a(1) = 1 are numbered 10,12,14,16,18,20,22,24, and 10, with a digit sum of 1, has the lowest digit sum of these.
a(4) = 30 as the seven unvisited neighbors of the square a(3) = 3 square are numbered 6,8,28,30,32,34,16, and 30, with a digit sum of 3, has the lowest digit sum of these.
a(9) = 5 as two of the unvisited neighbors of the square a(8) = 2 are 5 and 23, both of which have a digit sum of 5, but 5 is chosen as it is the lower number.
CROSSREFS
KEYWORD
nonn,base,fini
AUTHOR
Scott R. Shannon, Apr 19 2021
STATUS
approved