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 A335900 #14 Aug 01 2022 21:17:28 %S A335900 1,2,3,4,5,6,7,8,23,22,21,20,19,18,17,38,37,64,65,66,67,68,39,40,41, %T A335900 42,43,74,73,110,109,154,155,208,269,268,337,338,339,340,271,272,211, %U A335900 274,275,346,347,426,427,514,515,428,349,278,277,214,159,158,157,212,213,276 %N A335900 Squares visited by a fairy chess wazir moving on a square-spiral numbered board where the wazir moves to the unvisited square containing the spiral number with the fewest divisors. In case of a tie it chooses the square with the lowest spiral number. %C A335900 A fairy chess wazir can move one step in each of the four orthogonal grid directions, i.e., the same directions as a chess rook but only one square. In this sequence the wazir moves to the closest unvisited neighboring square which contains the number with the fewest divisors, and in case of a tie the square with the lowest spiral number. Note that if the wazir simply moves to the lowest available number the sequence will be infinite as the wazir will just follow the square spiral path. %C A335900 The sequence is finite. After 61 steps the square with number 276 is visited, after which all four neighboring squares have been visited. %C A335900 Due to the wazir'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 neighboring squares. Of the 61 visited squares, 21 contain prime numbers, while 40 contain composites. The largest visited square is a(51) = 515. %H A335900 Scott R. Shannon, <a href="/A335900/a335900.png">Image showing the 61 steps of the wazir's path</a>. A green dot marks the starting 1 square and a red dot the final square with number 276. The red dot is surrounded by four blue dots to show the unavailable neighboring squares. A yellow dot marks the smallest unvisited square with number 9. %e A335900 The board is numbered with the square spiral: %e A335900 . %e A335900 17--16--15--14--13 . %e A335900 | | . %e A335900 18 5---4---3 12 29 %e A335900 | | | | | %e A335900 19 6 1---2 11 28 %e A335900 | | | | %e A335900 20 7---8---9--10 27 %e A335900 | | %e A335900 21--22--23--24--25--26 %e A335900 . %e A335900 a(1) = 1, the starting square for the wazir. %e A335900 a(2) = 2. The four unvisited squares around a(1) to which the wazir can move are numbered 2,4,6,8. Of these, 2 has only two divisors, so it is the square chosen. %e A335900 a(9) = 23. The two unvisited squares around a(8) = 8 to which the wazir can move are numbered 9 and 23. Of these, 23 has only two divisors, so it is the square chosen. %Y A335900 Cf. A335816, A333713, A333714, A336092, A336038, A316667. %K A335900 nonn,walk,fini,full %O A335900 1,2 %A A335900 _Scott R. Shannon_, Jun 29 2020