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.

Showing 1-5 of 5 results.

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

A306308 Table read by rows: the end square loops for a trapped knight moving on an infinitely large 2-dimensional spirally numbered board starting from any square.

Original entry on oeis.org

404, 3328, 2666, 1338, 736, 1535, 2168, 406, 2444, 2945, 2245, 605, 684, 2663, 2312, 3323, 935, 910
Offset: 1

Views

Author

Scott R. Shannon, Feb 05 2019

Keywords

Comments

Construction: with a knight (a (1,2)-leaper) on an infinite spiral numbered board moving to the lowest numbered unvisited square (see A316884), start the knight on any square and continue moving it until it is trapped. Then start an entirely new sequence starting the knight at the same square at which it was previously trapped. Continue this process until the square at which the knight is trapped has occurred previously, indicating an end square loop. All starting squares for the knight on the infinite board will eventually lead to the knight path falling into one of the 3 end square loops listed here.
As the total number of squares in which the knight can be trapped is finite (see A306291), we expect there to be a finite number of end square loops - in theory, only those values (1518 is all) need to be checked when searching for an end square loop. However, all starting square values up to 302500 have been checked to determine into which of the 3 found loops the knight eventually falls. The 13-member loop with 406 as its lowest number is found to be the dominant loop, with about 89.6% of all initial starting squares going to it. The other 10.4% mostly go to the 3-member loop with 404 as its lowest number, with a decreasingly small remainder going to the 2-member loop with 910 as it lowest number. The attached 3-color image showing the start-value-to-loop mapping shows that the pattern of starting square to end square loops becomes very regular away from the center of the board.

Examples

			The 3 end square loops are:
1: 404, 3328, 2666
2: 1338, 736, 1535, 2168, 406, 2444, 2945, 2245, 605, 684, 2663, 2312, 3323
3: 935, 910
Starting the knight from the square 1 leads to the first 3-member loop after two iterations: the sequence of end squares is 2084, 404, 3328, 2666, 404, ... . Starting from the square 2 leads to the second (13-member) loop after ten iterations: the sequence is 711, 632, 4350, 3727, 3610, 7382, 2411, 4632, 4311, 1338, ... . The third (2-member) loop is not seen until the knight starts from square 284, the sequence being entered after two iterations via 1168, 935, 910, 935, ... .
		

Crossrefs

A333683 The number of steps for a knight to be trapped when moving on a spirally numbered hexagonal board to the lowest available unvisited cell and starting at cell n.

Original entry on oeis.org

83965, 738091, 277614, 252431, 731818, 731818, 765367, 622644, 252431, 252431, 1409949, 1720441, 512861, 925161, 251386, 1967478, 24228, 759058, 738091, 765367, 813609, 251386, 427289, 3220511, 48709, 151878, 231983, 121515, 113147, 894298, 158680, 815439, 1452850, 231479
Offset: 1

Views

Author

Scott R. Shannon, Apr 02 2020

Keywords

Comments

For a knight moving on a spirally numbered hexagonal board to the lowest available unvisited cell, see A327131, a(n) gives the number of steps before the knight is trapped when the knight starts on the cell numbered n.
See A327131 for the allowed knight moves, a diagram of the hexagonal board, and an illustration of the knight's path for n = 1.
For the first 100000 terms the longest path before the knight is trapped is for starting starting cell 81479 where it is trapped after 8125572 steps, the final cell being 8085793. In the same range the shortest path before being trapped is for starting cell 1036 where it is trapped after 1603 steps, the final cell being 1267. See the image in the links. This is likely the shortest path to being trapped for all starting cells.

Examples

			The knight starting on cell 1 becomes trapped after 83965 steps, see A327131.
		

Crossrefs

Cf. A333684 (trapped cell number), A327131, A309918, A328894, A306291.

A307422 End squares for a trapped knight moving on a diagonally numbered 2D board where the knight starts from square n.

Original entry on oeis.org

1378, 66, 561, 406, 2701, -1, 78, 15, 561, 78, 120, 1378, 36, 36, 435, 66, 2628, 1275, 78, 378, 190, 1326, 136, 300, 15, 325, 3570, -1, 171, 231, 780, 595, 21, 28, 561, 276, 120, 28, 28, 496, 435, -1, 153, 171, 2415, 28, 496, 300, 2850, 55, 15, 465, 1431
Offset: 1

Views

Author

Scott R. Shannon, Apr 08 2019

Keywords

Comments

For a knight (a 2 X 1 leaper) moving on a diagonally numbered 2D board to the lowest-numbered available square at each step (see A316588), a(n) is the number of the square at which the knight is trapped if it starts from square n. '-1' in the sequence indicates no ending square, i.e., the knight's path is unbounded and it leaps forever. Unlike the spirally number board which has a finite list of end square values (see A306291), the diagonally numbered board displays an infinite list of end squares and an infinite number of unbounded paths. Also up to starting squares of 10 million there are only 8 end squares which are not on the left edge of the board.
Unlike the behavior of a knight on a spirally numbered board, this sequence has knight paths which are unbounded, having no ending square. This is due to the knight's path creating linear sequences of visited squares which cannot be crossed by the knight when it revisits the same area of the board. This forces it to follow paths farther and farther from the origin as it moves back and forth between the board's two edges (see link images). The data show that starting square 6, and every 4th square down the left edge of the board from 6, will form such paths and thus be unbounded. These values, u(t), are 6, 28, 66, 120, 190, ..., which can be written as u(t) = 8*t^2 - 2*t, for all t >= 1. In addition there is one other starting square, 42, which shows similar behavior, although the repetitive pattern the knight's path forms is slightly different.
The above unbounded path starting squares of the form u(t) lead to the presence of paths whose starting square is just one leap away from these squares. But as there is now one extra visited point away from the left edge of the board as the (otherwise unbounded) repetitive path moves outward and over the starting square, the pattern is interrupted; this leads to its eventually being trapped on the left edge, but in a predictable manner based on the value of the initial starting square. The data show that there are three groups of such starting squares, each group having a square u(t) as its second visited square, and each group having a different path to being trapped once the path passes the starting square. These starting and ending squares can be fitted with a quadratic equation; see the example table below. The upshot of this is that there is an ending square associated with each of the unbounded u(t) starting squares, implying there is an infinite list of ending squares whose value grows arbitrarily large with the associated u(t).
The vast majority of all knight paths starting from any square end by being trapped on the left edge of the board: a(1) = 1378 is the first example. The squares 28, 210, 231, 3655 are the dominant end squares: together they trap about 66% of all bounded knight paths. These squares trap the many paths that initially move diagonally straight toward the top edge of the board, then toward the origin before moving back out. Likewise, the squares 69751, 96580, 208981 trap similar paths along the left edge; together these trap about 22% of all bounded paths. On the other hand, data from all starting squares up to 10 million shows left-edge squares which only have one path ending on them; squares 91, 351, 11325, 15225 are examples. The same data also show a few squares on the left edge on which no paths end; 14535 and 49770 are the first two such squares (for values >= 15). It is unknown if these squares never act as end squares or if paths with very large starting squares eventually end on them. Starting squares that lead to paths that initially approach near the origin or the left edge of the board almost always lead to ending squares that are scattered fairly uniformly along all other squares on the left edge of the board. The first few diagonals of the board near the origin never act as ending squares; square 15 was the smallest ending square found, first reached by starting square 8.
Only eight other end squares were found that are not on the left edge of the board. Five of these (with values 5299, 9487, 50254, 208320, 486688) seem to be unique end squares for only one or two starting squares, while the remaining three (with values 4772, 45736, 194996) form the end square for different infinite lists of starting squares; all are from paths initially moving on straight lines toward the origin but which are eventually very close to the end square. In fact, the first member of each of the three infinite lists is a square that also acts as one of the eight blocking squares for the eventual end square. These three lists are also definable by a quadratic. It is unknown if more than these eight non-left-edge end squares exist, although it is plausible that this is the entire list.

Examples

			a(1) = 1378 (see A316588).
The table below shows the starting square to end square mapping - either a single square or a quadratic equation for all valid values, and if the end square(s) are on the left edge of the board. For all quadratics, t >= 1. This is from data for all starting squares up to 10 million.
-------------------------------+----------------------------+-----
            Start              |            End             | Left
            square             |           square           | Edge
-------------------------------+----------------------------+-----
              42               |       NA (unbounded)       |  -
       8*t^2-2*t = u(t)        |       NA (unbounded)       |  -
-------------------------------+----------------------------+-----
             2228              |            5299            |  No
             3569              |            9487            |  No
            27256              |           50254            |  No
           187573              |          208320            |  No
       191268, 200657          |          486688            |  No
-------------------------------+----------------------------+-----
  9*t^2/2+ 589*t/2+4771 = n(t) |            4772            |  No
  9*t^2/2+1813*t/2+45735       |           45736            |  No
  9*t^2/2+3745*t/2+194995      |          194996            |  No
-------------------------------+----------------------------+-----
      72*t^2+222*t+170 = ps(t) |  72*t^2+738*t+1891 = pe(t) |  Yes
      72*t^2+270*t+252         |  72*t^2+786*t+2145         |  Yes
      72*t^2+318*t+350         |  72*t^2+666*t+1540         |  Yes
-------------------------------+----------------------------+-----
          All other            |       >= 15, of form       |  Yes
           squares             |       t^2/2+9*t/2+10       |
-------------------------------+----------------------------+-----
For 'All other squares' about 88% of all paths end on one of the squares 28, 210, 231, 3655, 69751, 96580, 208981. Note that some left-edge squares, for example, 14535, currently have no known starting square which leads to a path ending on them.
		

Crossrefs

A333684 The cell number where a knight is trapped when moving on a spirally numbered hexagonal board to the lowest available unvisited cell and starting at cell n.

Original entry on oeis.org

72085, 706243, 270402, 236090, 716518, 716518, 730674, 657313, 236090, 236090, 1318101, 1634797, 482448, 901595, 237177, 1946730, 21429, 726318, 706243, 730674, 793200, 237177, 405933, 3095967, 51035, 159266, 218715, 106443, 101767, 927137, 148315, 786512, 1495770
Offset: 1

Views

Author

Scott R. Shannon, Apr 02 2020

Keywords

Comments

For a knight moving on a spirally numbered hexagonal board to the lowest available unvisited cell, see A327131, a(n) gives the cell number where the knight is trapped when the knight starts on the cell numbered n.
See A327131 for the allowed knight moves, a diagram of the hexagonal board, and an illustration of the knight's path for n = 1.
For the first 100000 terms the largest cell number where the knight is trapped is for starting starting cell 81479 where the final cell has number 8085793, being reached after 8125572 steps. In the same range the smallest cell number where the night is trapped is for starting cell 1036 where the final cell has number 1267, being reached after 1603 steps. See A333683 for an image of this path.

Examples

			The knight starting on cell 1 becomes trapped on cell 72085 after 83965 steps, see A327131.
		

Crossrefs

Cf. A333683 (number of steps), A327131, A309918, A328894, A306291.
Showing 1-5 of 5 results.