login
Squares visited by a knight moving on a square-spiral numbered board where the knight 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.
5

%I #20 Jul 14 2020 03:41:06

%S 1,10,3,6,17,4,7,2,5,8,11,14,29,86,27,12,31,94,61,16,19,22,41,106,67,

%T 18,37,62,139,98,191,142,97,34,13,58,89,178,127,52,83,26,47,118,163,

%U 76,23,20,43,70,109,74,71,44,73,158,113,214,157,274,271,212,277,346,211

%N Squares visited by a knight moving on a square-spiral numbered board where the knight 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 This sequences gives the numbers of the squares visited by a knight moving on a square-spiral numbered board, as described in A316667, where at each step the knight goes to the neighbor one knight-leap away which contains the number with the fewest divisors. If two or more neighbors exist with the same fewest number of divisors then the square with the lowest spiral number is chosen.

%C The sequence is finite. After 528 steps the square with number 33 is visited, after which all neighboring squares have been visited.

%C Due to the knight's preference for squares with the fewest divisors the knight will leap to a prime numbered square when possible, and the lowest prime if two or more unvisited primes are within one knight-leap. Therefore this sequence matches A330008 for the first 13 terms, but on the 13th step the square with number 86 is chosen as no primes are available and 86 has only four divisors, while A330008 chooses 32, the smallest available number, but which has six divisors.

%C Of the 528 visited squares 198 contain prime numbers while 330 contain composites. The largest visited square is a(410) = 3656.

%H Scott R. Shannon, <a href="/A335844/b335844.txt">Table of n, a(n) for n = 1..529</a>

%H Scott R. Shannon, <a href="/A335844/a335844.png">Image showing the 528 steps of the knight's path</a>. A green dot marks the starting 1 square and a red dot the final square with number 33. 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 21.

%e The board is numbered with the square spiral:

%e .

%e 17--16--15--14--13 .

%e | | .

%e 18 5---4---3 12 29

%e | | | | |

%e 19 6 1---2 11 28

%e | | | |

%e 20 7---8---9--10 27

%e | |

%e 21--22--23--24--25--26

%e .

%e a(1) = 1, the starting square for the knight.

%e a(2) = 10. The eight unvisited squares the knight can leap to from a(1) are numbered 10,12,14,16,18,20,22,24. Of these 10,14,22 have the minimum four divisors, and of those 10 is the smallest.

%Y Cf. A316667, A330008, A329520, A326922, A328928, A328929.

%K nonn,fini,full,walk

%O 1,2

%A _Scott R. Shannon_, Jun 26 2020