login
End squares for a trapped knight moving on a spirally numbered 2D grid where each square can be visited n times.
1

%I #71 Sep 26 2019 11:03:13

%S 2084,124561,1756923,21375782,48176535,128322490,196727321,230310289,

%T 606217402,2856313870,244655558,659075420,586292888,1646774611,

%U 1018215514,719687377,564513339,2779028614,298995630,1641747842,414061107,1467655587,584309414,1584716050

%N End squares for a trapped knight moving on a spirally numbered 2D grid where each square can be visited n times.

%C For a knight (a (1,2) leaper) starting at square 1 and moving on a spirally numbered 2D grid to the lowest-numbered available square at each step (see A316667), a(n) is the number of the square at which the knight is trapped if it is allowed to visit each square no more than n times -- the knight is not trapped until each of the 8 surrounding squares to which it can leap has been visited n times. The choice of the square to which it goes at each step is determined solely by the square with the lowest spiral number, as long as it has been visited fewer than n times. This is an infinite sequence, although end squares beyond a(35) are currently unknown.

%H Scott R. Shannon, <a href="/A306421/a306421_1.java.txt">Simplified Java code for producing the series</a>

%H Scott R. Shannon, <a href="/A306421/a306421.png">Visited positions for n=3</a>. For clarity only the visited positions are shown. Blue=3 visits, Green=2 visits, White=1 visit. Red is the final square (near top right corner). Note that the internal positions are all visited the maximum 3 times, and that the overall shape becomes an 'indented square' -- this pattern becomes more pronounced as n increases. Likewise the maximum visited x and y distances relative to the central square approach equality as n increases e.g. for n=35 both the maximum x and y visited distances are 59855.

%H N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=RGQe8waGJ4w">The Trapped Knight</a>, Numberphile video (2019)

%e For n = 1, the knight becomes trapped at square 2084 (see A316667). The following table gives the corresponding values for n = 1 through 35:

%e .

%e | Square at which | Number of steps

%e | the knight is | before the

%e n | trapped | knight is trapped

%e ---+-----------------+--------------

%e 1 | 2084 | 2016 (A316667)

%e 2 | 124561 | 244273

%e 3 | 1756923 | 4737265

%e 4 | 21375782 | 98374180

%e 5 | 48176535 | 258063291

%e 6 | 128322490 | 836943142

%e 7 | 196727321 | 1531051657

%e 8 | 230310289 | 1897092533

%e 9 | 606217402 | 5253106114

%e 10 | 2856313870 | 27296872250

%e 11 | 244655558 | 2772304666

%e 12 | 659075420 | 8437814958

%e 13 | 586292888 | 7875951360

%e 14 | 1646774611 | 24511621133

%e 15 | 1018215514 | 15493169264

%e 16 | 719687377 | 11643899003

%e 17 | 564513339 | 9593491769

%e 18 | 2779028614 | 49835086546

%e 19 | 298995630 | 5734502340

%e 20 | 1641747842 | 33370972720

%e 21 | 414061107 | 8844741817

%e 22 | 1467655587 | 32843399937

%e 23 | 584309414 | 13583967470

%e 24 | 1584716050 | 37945957450

%e 25 | 2544445470 | 62083869640

%e 26 | 4796115990 | 125967045044

%e 27 | 1881606731 | 51291895045

%e 28 | 1321212795 | 37635024035

%e 29 | 6693611092 | 196994700434

%e 30 | 687619472 | 19985943874

%e 31 | 1495794139 | 45392651369

%e 32 | 6677258413 | 213836002227

%e 33 | 6451059544 | 219770103702

%e 34 | 7958333435 | 277128625469

%e 35 | 13924943879 | 485324576539

%Y Cf. A316884, A316967, A316667, A316328, A317106, A317105, A317416, A317415, A317438, A317437.

%Y Cf. A323469, A323470, A323471, A323472.

%K nonn

%O 1,1

%A _Scott R. Shannon_, Feb 14 2019