OFFSET
1,1
COMMENTS
This is a complete list of all the possible ending 'trapped' square values for the knight (2 by 1 leaper) starting from any square. The list has 1518 values - the knight starting from any square on the infinite board will eventually be trapped on a square with one of these numbers.
I do not have a proof this is the complete list of all ending values but I believe it is correct. I have checked every knight starting square up to 100000 and they all end on one of these 1518 squares. I then check further out to 110000 and ensure these paths always move inwards once they pass the square of values which contains the 100000 value, and check they do not move outwards again passed this square. As every knight sequence out to infinity would have to cross/land between this 100000 to 110000 group of values (as they are attracted toward square 1 due to their lowest-available-value preference), and as all values have been checked inside these, it implies all knight paths with starting square values out to infinity eventually end on this list of 1518 squares.
Also note this is the ordered sequence of all 1518 squares - the initial value found starting the knight at square 1 is 2084.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..1518
Scott R. Shannon, Stripped down Java code for the sequence
Scott R. Shannon, Plot of all 1518 ending squares. The yellow line indicates the boundary of the 110000 starting values used in the generation of this data. In this spiral the square with value 2 is directly above the value 1 start square (green dot). The red dot is the square with value 404 (the most likely end value square).
Scott R. Shannon, Path for knight starting at square 175. The trapped square has value 104 - the smallest trapped square value. 8 Blue dots have been added around the final square to show all positions have been visited.
Scott R. Shannon, Path for knight starting at square 11509. The trapped square has value 23134 - the largest trapped square value. 8 Blue dots have been added around the final square to show all positions have been visited.
N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019)
EXAMPLE
The ending square for the knight starting on square with value 1 is 2084 (see A316667). The first starting square value to end on square 104 (the smallest value) is 175. The first starting square value to end on square 23134 (the largest value) is 11509. Testing various upper limits has shown the square with number 404 is the most likely square for any random starting square to end on (about 8% of all sequences end on it). The complete list of 1518 end squares can be generated by checking all starting squares from 1 up to 17390 (which produces the 1518th different end square of value 16851).
CROSSREFS
KEYWORD
fini,nonn
AUTHOR
Scott R. Shannon, Feb 04 2019
STATUS
approved