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.

This page as a plain text file.
%I A309918 #34 Oct 31 2019 12:07:03
%S A309918 2016,880,2741,857,2741,857,2741,3611,2590,1540,1846,2061,4892,1047,
%T A309918 4139,753,3559,590,426,1205,1140,2759,3830,4687,1839,2101,2861,5892,
%U A309918 5500,1295,2674,1213,890,1839,2749,6531,1118,3632,1496,2888,1995,2574,2713,495,1479,5509,1414,3926,1078
%N A309918 The number of steps for a knight to be trapped when moving on a spirally numbered 2D grid and starting at square n.
%C A309918 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.
%C A309918 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.
%C A309918 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.
%H A309918 Scott R. Shannon, <a href="/A309918/b309918.txt">Table of n, a(n) for n = 1..10000</a>.
%H A309918 Scott R. Shannon, <a href="/A309918/a309918.png">Path for starting square 76</a>. 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.
%H A309918 Scott R. Shannon, <a href="/A309918/a309918_2.png">Map of starting square to trapped steps count for n = 1 to 100000</a>. 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.
%H A309918 N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=RGQe8waGJ4w">The Trapped Knight</a>, Numberphile video (2019).
%e A309918 The knight starting on square 1 becomes trapped at step 2016, see A316667.
%Y A309918 Cf. A306291, A306308, A316667.
%K A309918 nonn,look
%O A309918 1,1
%A A309918 _Scott R. Shannon_, Aug 23 2019