login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A336447 Squares visited by a chess rook moving on a square-spiral numbered board where the rook moves to an unvisited square containing the smallest prime number. 5

%I #13 May 16 2021 07:59:35

%S 1,2,3,5,7,41,37,31,29,521,509,337,109,43,47,83,89,179,173,359,353,

%T 349,113,293,307,311,313,317,191,97,101,103,107,691,683,197,193,1429,

%U 1427,887,883,661,659,653,463,461,457,181,467,479,1163,1171,331,673,677,1153,1151,487,491,199

%N Squares visited by a chess rook moving on a square-spiral numbered board where the rook moves to an unvisited square containing the smallest prime number.

%C This sequences gives the numbers of the squares visited by a chess rook moving on a square-spiral numbered board where the rook starts on the 1 numbered square and at each step moves to an unvisited square containing the smallest prime number. The movement is restricted to the four directions a rook can move on a standard chess board, and the rook cannot move over a previously visited square. Note that if the rook simply moves to an unvisited square containing the smallest number the sequence will be infinite as the rook will just follow the square spiral path.

%C The sequence is finite. After 134 steps the square with number 863 is visited, after which all four squares the rook can move to have been visited.

%C The first term where this sequence differs from A336413, where the rook steps to the closest unvisited prime, is a(7) = 37. See the examples below.

%C The largest visited square is a(102) = 3739. The largest step distance between visited squares is 24 units, between a(128) = 2179 to a(129) = 2203. The largest prime gap between visited squares is 2646, from a(101) = 1093 to a(102) = 3739. The smallest unvisited prime is 11.

%H Scott R. Shannon, <a href="/A336447/a336447.png">Image showing the 134 steps of the rook's path</a>. A green square shows the starting 1 square, a red square shows the final square with number 863, and a thick white line is the path between visited squares. All visited prime numbered squares are shown in yellow, while those unvisited squares containing primes are shown in grey. The three squares which block the rook's movement from the final square are shown with a red border. The square spiral numbering of the board is shown as a thin white line. Click on the image to zoom in to see the prime numbers.

%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 rook.

%e a(2) = 2. The four unvisited prime numbered squares around a(1) the rook can move to are numbered 2,61,19,23. Of these 2 is the smallest.

%e a(7) = 37. The three unvisited prime numbered squares around a(6) = 41 the rook can move to are numbered 37,43,107. Of those 37 is the smallest. Note that 43 is the closest prime, being only 2 units away while 37 is 4 units away.

%e a(135) = 863. The final square. The three previously visited prime numbered squares around a(135) are numbered 191,859,1709. Note there is no fourth prime as the column of squares directly upward from 863 contains no primes; the values from 871,994,1125,... and beyond fit the quadratic 4n^2+119n+871, which can be factored as (4n+67)*(n+13), and thus contains no primes.

%Y Cf. A336446, A336402, A336413, A330979, A000040, A063826, A214664, A214665, A136626, A115258, A331027.

%K nonn,fini,full,walk

%O 1,2

%A _Scott R. Shannon_, Jul 22 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 13:11 EDT 2024. Contains 371913 sequences. (Running on oeis4.)