OFFSET
1,1
COMMENTS
For a knight moving on a spirally numbered 2D grid to the lowest available unvisited square, see A316667, a(n) gives the number of steps before the knight is trapped when the knight starts on the square numbered n.
For n up to 1200000 the smallest number of steps before being trapped is for the starting square 76 where it is trapped at step 263, the final square being 150. As the maximum relative x or y coordinate offset from the central 1 square is more than 526 ( 2 * 263 ) for starting values near 1100000, and as no smaller path to being trapped was found, this implies 263 is the smallest possible path to being trapped for all possible starting squares.
The largest number of steps before being trapped for n up to 1200000 is for starting square 11509 where it is trapped at step 21346, the final square being 23134. See A306291 for an image of the path. This is a surprisingly small numbered starting square considering the longest path to being trapped for starting squares 20000 to 1200000 is 14280. Note however that the maximum number of steps is not bounded since it will increase to arbitrarily large values as the knight starts farther and farther away from the central 1 square.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000.
Scott R. Shannon, Path for starting square 76. The start square 76 is marked with a green dot, the final square 150 with a red dot, and the eight surrounding blocking squares with blue dots.
Scott R. Shannon, Map of starting square to trapped steps count for n = 1 to 100000. The colors are graded from red to violet indicating the relative size of the number of steps to being trapped for the corresponding start square. The pattern is surprisingly similar to the starting square to loop mapping image shown in A306308.
N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019).
EXAMPLE
The knight starting on square 1 becomes trapped at step 2016, see A316667.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Aug 23 2019
STATUS
approved