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.
%I A344230 #19 Jul 12 2022 19:52:58 %S A344230 1,6,9,2,7,4,5,8,11,14,3,10,19,22,15,12,17,28,13,18,29,32,23,16,35,46, %T A344230 21,34,25,48,33,20,27,40,31,54,39,26,51,68,41,44,55,30,43,60,47,24,49, %U A344230 62,45,42,53,38,65,52,37,66,85,70,57,76,61,80,97,116,75,56,59,74,71,58,73,88,69,84,101,124,83,50,67,82,103,86,107,72,87,104,123,148,105,128,89,92,109,112,93,90,111,130,91,108,127,152,131,134,113,94,77,98,63,36 %N A344230 Squares visited by a knight (chess piece) moving to the lowest-numbered unvisited square at each step on a semi-infinite chessboard numbered by starting in the lower left and filling in squares in a counterclockwise way moving to the bottom leftmost unnumbered square when the edge of the board is encountered. %C A344230 The sequence is finite and ends at the 111th move, which takes the knight to the square numbered 36 (the leftmost square on the 6th row). %C A344230 The squares on the board are numbered as follows: %C A344230 . . . . . . . %C A344230 . . . . . . . %C A344230 . . . . . . . %C A344230 +----+----+----+----+----+----+----+ %C A344230 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | ... %C A344230 ending +----+----+----+----+----+----+----+ %C A344230 square ---> | 36 | 35 | 34 | 33 | 32 | 31 | 42 | ... %C A344230 +----+----+----+----+----+----+----+ %C A344230 | 25 | 24 | 23 | 22 | 21 | 30 | 41 | ... %C A344230 +----+----+----+----+----+----+----+ %C A344230 | 16 | 15 | 14 | 13 | 20 | 29 | 40 | ... %C A344230 +----+----+----+----+----+----+----+ %C A344230 | 9 | 8 | 7 | 12 | 19 | 28 | 39 | ... %C A344230 +----+----+----+----+----+----+----+ %C A344230 | 4 | 3 | 6 | 11 | 18 | 27 | 38 | ... %C A344230 starting +----+----+----+----+----+----+----+ %C A344230 square ---> | 1 | 2 | 5 | 10 | 17 | 26 | 37 | ... %C A344230 +----+----+----+----+----+----+----+ %H A344230 N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=RGQe8waGJ4w">The Trapped Knight</a>, Numberphile video (2019). %t A344230 findvalue[{i_, j_}] := If[j > i, (j - 1)^2 + 2 j - i, (i - 1)^2 + j]; %t A344230 possiblemoves[{i_, j_}, prev_List] := %t A344230 Block[{moves = {{i + 2, j + 1}, {i + 2, j - 1}, {i + 1, %t A344230 j + 2}, {i + 1, j - 2}, {i - 1, j + 2}, {i - 1, j - 2}, {i - 2, %t A344230 j + 1}, {i - 2, j - 1}}, list}, %t A344230 list = DeleteCases[moves, {x_, y_} /; x < 1 || y < 1]; %t A344230 Complement[list, Intersection[list, prev]]]; %t A344230 findnextmove = %t A344230 Block[{listofmoves = #, nextmove, poss}, %t A344230 pos = possiblemoves[listofmoves[[-1]], listofmoves]; %t A344230 If[Length[pos] > 0, %t A344230 nextmove = Sort[({findvalue[#], #} &) /@ pos][[1, 2]]; %t A344230 AppendTo[listofmoves, nextmove], listofmoves]] &; %t A344230 findvalue /@ FixedPoint[findnextmove, {{1, 1}}] %Y A344230 Cf. A316667. %K A344230 nonn,fini,full,walk %O A344230 1,2 %A A344230 _Roman Mecholsky_, May 12 2021