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!)
A335856 Squares visited by a chess king moving on a square-spiral numbered board where the king moves to the adjacent unvisited square containing the lowest prime number. In no adjacent prime numbered squares are present it chooses the lowest spiral number. 3
1, 2, 3, 11, 29, 13, 31, 59, 32, 14, 4, 5, 17, 37, 67, 103, 149, 104, 66, 38, 18, 19, 7, 23, 47, 79, 48, 24, 8, 6, 20, 41, 71, 43, 73, 109, 72, 42, 21, 22, 44, 45, 46, 76, 75, 113, 74, 112, 110, 111, 157, 211, 271, 209, 269, 337, 267, 205, 151, 107, 69, 39, 40 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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 the adjacent unvisited square containing the lowest prime number. If no adjacent unvisited square contains a prime number then the square with the lowest spiral number is chosen. Note that if the king simply moves to the lowest unvisited number the sequence will be infinite as the king will just follow the square spiral path.
The sequence is finite. After 719 steps the square with number 437 is visited, after which all adjacent neighboring squares have been visited.
Of the 719 visited squares 165 contain prime numbers while 554 contain composites. As the odd numbers are diagonally adjacent in the square spiral the king's path will contain many diagonal steps, often taking numerous diagonal steps is succession - see the attached link image.
The largest visited square is a(709) = 1367. The lowest unvisited square is 33.
The 719 steps until self-trapping occurs are significantly larger than the expected average of 210 moves to self-trapping for a random walk of the king on an infinite chessboard. See the link to the probability density graphs in A323562. - Hugo Pfoertner, Jul 19 2020
LINKS
Scott R. Shannon, Image showing the 719 steps of the path. A green dot marks the starting 1 square and a red dot the final square with number 437. 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 33.
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(1) = 1, the starting square for the king.
a(2) = 2. The four unvisited squares around a(1) the king can move which contain prime numbers are 2,3,5,7. Of those 2 is the lowest.
a(4) = 11. The two unvisited squares around a(3) = 3 the king can move to which contain prime numbers are 11 and 13. Of those 11 is the lowest.
a(9) = 32. There are no unvisited squares around a(8) = 59 which contain prime numbers. The seven other unvisited squares are numbered 32,33,58,60,93,94,95. Of those 32 is the lowest.
CROSSREFS
Sequence in context: A232219 A265095 A301804 * A335816 A330979 A336402
KEYWORD
nonn,walk,fini,full
AUTHOR
Scott R. Shannon, Jun 27 2020
STATUS
approved

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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)