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!)
A336038 Squares visited by a chess king on a square-spiral numbered board and stepping to the lowest unvisited adjacent square, where each step is not in the same direction as the previous step. 4
1, 2, 3, 4, 6, 5, 15, 14, 12, 11, 9, 8, 22, 7, 19, 18, 16, 17, 35, 34, 60, 32, 13, 29, 28, 10, 25, 24, 46, 23, 45, 21, 20, 40, 39, 67, 37, 36, 38, 66, 64, 63, 97, 61, 62, 96, 95, 59, 33 (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, which is not in the same direction as its previous step, moves to an adjacent unvisited square, out of the eight adjacent neighboring squares, which contains the lowest spiral number.
The sequence is finite. After 48 steps the square with spiral number 33 is reached after which all eight adjacent squares have been visited.
If the king simply moved to the lowest numbered unvisited adjacent square the walk would be infinite as the king would just follow the path of the square spiral. By not allowing consecutive moves in the same direction forces the king off this minimal numbered path. The first time this happens is a(5) = 6 as from a(4) = 4 the lowest numbered adjacent square is 5 but that would require a step directly to the left, the same as the previous step from a(3) = 3 to a(4).
LINKS
Scott R. Shannon, Image showing the 48 steps of the king's path. The green dot is the first square with number 1 and the red dot the last square with number 33. The red dot is surrounded by blue dots to show the eight occupied squares. The yellow dots marks the smallest unvisited square with number 26.
N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019).
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 of the king.
a(2) = 2. The eight adjacent unvisited squares around a(1) are numbered 2,3,4,5,6,7,8,9. Of these 2 is the lowest.
a(5) = 6. The five adjacent unvisited squares around a(4) = 4 are numbered 5,6,14,15,16. Of these 5 is the lowest but that would require a step directly left from 4, which is the same step as a(3) = 3 to a(4) = 4, so is not allowed. The next lowest available square is 6.
CROSSREFS
Sequence in context: A362855 A370740 A365536 * A347401 A361332 A240809
KEYWORD
nonn,fini,full,walk
AUTHOR
Scott R. Shannon, Jul 12 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 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)