login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A375925
Squares visited by a king moving on a walled, spirally numbered board, where a wall must be jumped on each move, always to the lowest available unvisited square.
1
1, 4, 14, 3, 11, 2, 8, 22, 7, 19, 5, 15, 33, 13, 29, 12, 28, 10, 24, 9, 23, 45, 21, 41, 20, 6, 18, 38, 17, 35, 16, 34, 60, 32, 58, 31, 55, 30, 54, 86, 52, 26, 48, 25, 47, 77, 46, 76, 44, 74, 43, 71, 42, 70, 40, 68, 39, 67, 37, 63, 36, 62, 96, 61, 95, 59, 93
OFFSET
1,2
COMMENTS
Board is numbered with the walled, square spiral:
.
17 16 15 14 13 | .
------------- | .
18 | 5 4 3 |12 | .
| ----- | | .
19 | 6 | 1 2 |11 | .
| --------- | .
20 | 7 8 9 10 | .
----------------- .
21 22 23 24 25 26
.
Walls mark off the path of the spiral.
A king move must go through a wall when drawing a line between the center of the start and end square. Note that some moves touch a wall but do not pass through a wall (e.g. 1 to 3), these are not permissible.
Due to the wall rule, the next term cannot be +/-1 or +/-2.
LINKS
Kevin Ryde, Path Plot
EXAMPLE
For n = 2, a(n) = 4 because moving to 2 or 3 does not pass through a wall.
CROSSREFS
Cf. A033638, A316667 (trapped knight), A336038 (trapped king).
Sequence in context: A107775 A003117 A239465 * A156985 A138229 A131702
KEYWORD
nonn
AUTHOR
Sameer Khan, Sep 03 2024
STATUS
approved