This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A336092 #11 Jul 13 2020 21:26:04 %S A336092 1,7,23,47,79,49,25,9,11,29,53,87,127,177,233,299,373,454,543,641,746, %T A336092 859,979,1109,1247,1393,1249,1111,983,863,751,647,753,866,865,985, %U A336092 1115,1253,1399,1553,1714,1883,2059,2243,2437,2638,2846,3063,3287,3061,2843,2633,2841,3057,3281,3513,3755 %N A336092 Squares visited by a chess king moving on a square-spiral numbered board where the king moves to the adjacent unvisited square containing the spiral number with the fewest divisors. In case of a tie it chooses the square with the largest spiral number. %C A336092 This sequences gives the numbers of the squares visited by a chess king moving on a square-spiral numbered board where the king starts on the 1 numbered square and at each step moves to an adjacent unvisited square, out of the eight adjacent neighboring squares, which contains the number with the fewest divisors. If two or more adjacent squares exist with the same fewest number of divisors then the square with the largest spiral number is chosen. Note that if the king simply moves to the largest available number the sequence will be infinite as the king will step along the south-east diagonal from square 1 forever. %C A336092 The sequence is finite. After 21276 steps the square with spiral number 281747427 is visited, after which all adjacent neighboring squares have been visited. The end square is extremely far from the starting square, approximately 8860 units away, as the king is drawn generally outward due to its preference for the largest numbered square when the divisor counts are tied - see the link image. This end square spiral number is currently the largest for any square spiral single-visit trapped knight or trapped king path in the OEIS. %C A336092 Due to the king's preference for squares with the fewest divisors it will move to a prime numbered square when possible, and the lowest prime if two or more unvisited primes are in adjacent squares. Of the 21276 visited squares 4363 contain prime numbers while 16913 contain composites. The largest visited square is a(21208) = 282486458. %H A336092 Scott R. Shannon, <a href="/A336092/a336092.png">Image showing the 21276 steps of the king's path</a>. A green dot, far lowest left, marks the starting 1 square and a red dot, far upper right, the final square with number 281747427. The red dot is surrounded by eight blue dots to show the occupied neighboring squares. A yellow dots marks the smallest unvisited square with number 2. This is a high resolution image and may need to be downloaded to be viewed correctly. %e A336092 The board is numbered with the square spiral: %e A336092 . %e A336092 17--16--15--14--13 . %e A336092 | | . %e A336092 18 5---4---3 12 29 %e A336092 | | | | | %e A336092 19 6 1---2 11 28 %e A336092 | | | | %e A336092 20 7---8---9--10 27 %e A336092 | | %e A336092 21--22--23--24--25--26 %e A336092 . %e A336092 a(1) = 1, the starting square for the king. %e A336092 a(2) = 7. The eight unvisited squares around a(1) the king can move to are numbered 2,3,4,5,6,7,8,9. Of these 2,3,5,7 have the minimum two divisors, and of those 7 is the largest. %e A336092 a(3) = 23. The seven unvisited squares around a(2) the king can move to are numbered 6,8,19,20,21,22,23. Of these 19 and 23 have the minimum two divisors, and of those 23 is the largest. %Y A336092 Cf. A335816 (choose lowest number in case of tie), A333713, A333714, A316667, A330008, A329520, A326922. %K A336092 nonn,walk,fini,full %O A336092 1,2 %A A336092 _Scott R. Shannon_, Jul 08 2020