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!)
A326922 Squares visited by a knight moving on a board with squares labeled with their squared distance from the origin and where the knight moves to the smallest labeled unvisited square; the smallest spiral number ordering is used if the distances are equal. 22
0, 5, 2, 1, 2, 1, 2, 1, 2, 1, 4, 5, 10, 13, 4, 5, 10, 5, 10, 5, 4, 13, 10, 5, 10, 13, 4, 5, 10, 13, 16, 13, 10, 5, 16, 13, 20, 9, 8, 9, 8, 9, 8, 9, 8, 17, 18, 17, 26, 25, 20, 25, 10, 13, 16, 29, 18, 17, 26, 25, 20, 25, 20, 13, 16, 29, 18, 17, 26, 25, 20, 25, 40, 41, 34, 37, 50, 29, 18, 17, 26, 25, 20, 25, 20, 25, 26, 37, 34, 25, 26, 17, 34, 25, 26, 17, 34, 25, 20, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
This sequence uses the squared distance from the origin to label the squares. At each step the knight goes to an unvisited square with the smallest label; if there are two or more squares with the same label it then chooses the square with the smallest number if the board was numbered as a spiral, i.e., the smallest spiral numbered square as in A316667.
The sequence is finite. After 22325 steps a square with label 6885 (spiral number = 25984) is visited, after which all neighboring squares have been visited.
If one looks at the spiral number for the visited squares in this sequence one finds it is the same as A316667 for the first 34 steps. On the 35th step this sequence goes to a square with spiral number 77, which is 4 units from the origin, while A316667 goes to square 43, which is sqrt(18) (> 4) units from the origin.
Sequence A326924 gives the number of the square visited at the n-th move, which is at distance^2 a(n) from the origin, cf. formula. - M. F. Hasler, Oct 22 2019
LINKS
Scott R. Shannon, Table of n, a(n) for n = 0..22325 [The complete sequence]
Scott R. Shannon, Image showing the 22325 steps of the knight's path. The green dot is the first square with number 0 and the red dot the last 22326th square with number 6885. The red dot is surrounded by blue dots to show the eight occupied squares. [The red dot is near the boundary at about 4 o'clock.]
N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019).
FORMULA
a(n) = A174344(A326924(n))^2 + A274923(A326924(n))^2. - M. F. Hasler, Oct 22 2019
EXAMPLE
The squares are labeled using their squared distance from the origin:
.
+----+----+----+----+----+----+----+
| 18 | 13 | 10 | 9 | 10 | 13 | 18 |
+----+----+----+----+----+----+----+
| 13 | 8 | 5 | 4 | 5 | 8 | 13 |
+----+----+----+----+----+----+----+
| 10 | 5 | 2 | 1 | 2 | 5 | 10 |
+----+----+----+----+----+----+----+
| 9 | 4 | 1 | 0 | 1 | 4 | 9 |
+----+----+----+----+----+----+----+
| 10 | 5 | 2 | 1 | 2 | 5 | 10 |
+----+----+----+----+----+----+----+
| 13 | 8 | 5 | 4 | 5 | 8 | 13 |
+----+----+----+----+----+----+----+
| 18 | 13 | 10 | 9 | 10 | 13 | 18 |
+----+----+----+----+----+----+----+
.
If the knight has a choice of two or more squares with the same label (same squared distance from the origin), then the square with the minimum spiral number, as shown in A316667, is chosen.
PROG
(PARI) A326922(n)=norml2(coords(A326924(n))) \\ with coords() defined in A296030, or see formula. - M. F. Hasler, Oct 22 2019
CROSSREFS
Cf. A174344, A274923, A296030 (coordinates of the square number n).
Sequence in context: A029764 A136301 A132690 * A343678 A089086 A238716
KEYWORD
nonn,fini,full
AUTHOR
Scott R. Shannon, Oct 21 2019
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 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)