cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A309918 The number of steps for a knight to be trapped when moving on a spirally numbered 2D grid and starting at square n.

Original entry on oeis.org

2016, 880, 2741, 857, 2741, 857, 2741, 3611, 2590, 1540, 1846, 2061, 4892, 1047, 4139, 753, 3559, 590, 426, 1205, 1140, 2759, 3830, 4687, 1839, 2101, 2861, 5892, 5500, 1295, 2674, 1213, 890, 1839, 2749, 6531, 1118, 3632, 1496, 2888, 1995, 2574, 2713, 495, 1479, 5509, 1414, 3926, 1078
Offset: 1

Views

Author

Scott R. Shannon, Aug 23 2019

Keywords

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.

Examples

			The knight starting on square 1 becomes trapped at step 2016, see A316667.
		

Crossrefs