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.

Previous Showing 11-20 of 25 results. Next

A323810 Squares visited by a knight on a diagonally numbered board and moving to the lowest available unvisited square at each step and if no unvisited squares are available move one step back.

Original entry on oeis.org

1, 8, 6, 2, 12, 9, 4, 3, 13, 7, 5, 10, 26, 18, 11, 30, 24, 16, 38, 31, 22, 17, 25, 20, 28, 34, 14, 21, 43, 33, 27, 19, 15, 35, 42, 32, 23, 29, 39, 47, 56, 69, 37, 48, 40, 51, 60, 70, 57, 67, 81, 46, 58, 49, 41, 52, 44, 55, 64, 36, 65, 53, 45, 76, 63, 54, 66, 103, 88, 74, 61
Offset: 1

Views

Author

Daniël Karssen, Jan 28 2019

Keywords

Comments

Board is numbered as follows:
1 2 4 7 11 16 .
3 5 8 12 17 .
6 9 13 18 .
10 14 19 .
15 20 .
21 .
.
Coincides with A316588 for the first 2402 terms. - Daniël Karssen, Jan 30 2019

Crossrefs

The sequences involved in this set of related sequences are A316588, A316328, A316334, A316667, A323808, A323809, A323810, and A323811.

A323811 Squares visited by a knight on a diagonally numbered board and moving to the lowest available unvisited square at each step and if no unvisited squares are available move one step back.

Original entry on oeis.org

0, 7, 5, 1, 11, 8, 3, 2, 12, 6, 4, 9, 25, 17, 10, 29, 23, 15, 37, 30, 21, 16, 24, 19, 27, 33, 13, 20, 42, 32, 26, 18, 14, 34, 41, 31, 22, 28, 38, 46, 55, 68, 36, 47, 39, 50, 59, 69, 56, 66, 80, 45, 57, 48, 40, 51, 43, 54, 63, 35, 64, 52, 44, 75, 62, 53, 65, 102, 87, 73, 60
Offset: 0

Views

Author

Daniël Karssen, Jan 28 2019

Keywords

Comments

Board is numbered as follows:
0 1 3 6 12 17 .
2 4 7 13 18 .
5 10 14 19 .
11 15 20 .
16 21 .
22 .
.
Coincides with A316334 for the first 2402 terms.

Crossrefs

The sequences involved in this set of related sequences are A316588, A316328, A316334, A316667, A323808, A323809, A323810, and A323811.

A358150 Squares visited by a knight moving on a square-spiral numbered board where the knight moves to the smallest numbered unvisited square and where the square number is more than the number of currently visited squares.

Original entry on oeis.org

1, 10, 3, 6, 9, 12, 15, 18, 35, 14, 11, 24, 27, 48, 23, 20, 39, 36, 61, 32, 29, 52, 25, 28, 51, 80, 47, 76, 43, 70, 105, 38, 63, 34, 59, 56, 87, 126, 53, 84, 49, 78, 45, 74, 71, 106, 67, 64, 97, 60, 93, 90, 55, 58, 89, 92, 131, 88, 127, 174, 83, 120, 79, 116, 75, 72, 107, 68, 103, 100, 141
Offset: 1

Views

Author

Scott R. Shannon, Nov 01 2022

Keywords

Comments

This sequence is finite: after 15767 squares have been visited the square with number 15813 is reached after which all eight neighboring squares the knight could move to have already been visited. See the linked image. The largest visited square is a(15525) = 19363, while numerous smaller numbered squares are never visited, e.g., 2, 4, 5, 7, 8, 13, 16, 17, 19, ... .

Examples

			The board is numbered with the square spiral:
.
  17--16--15--14--13   .
   |               |   .
  18   5---4---3  12   29
   |   |       |   |   |
  19   6   1---2  11   28
   |   |           |   |
  20   7---8---9--10   27
   |                   |
  21--22--23--24--25--26
.
a(6) = 12 as after the knight moves to the square containing 9 the available unvisited squares are 4, 12, 22, 26, 28, 46, 48. Of these 4 is the smallest but as we have already visited five squares that cannot be chosen. Of the remaining squares greater than five the smallest unvisited square is 12. This is the first term to differ from A316667.
		

Crossrefs

A324274 a(n) is the number of squares visited by a single pawn move for an even square and a double pawn move for an odd square on a diagonally numbered board and moving to the lowest available unvisited square of different parity at each step from subsequent starting squares n; or a(n) = 0 for an infinite length.

Original entry on oeis.org

20, 0, 8, 17, 6, 9, 4, 7, 0, 11, 16, 5, 18, 0, 10, 19, 8, 19, 8, 11, 12, 25, 6, 9, 6, 9, 0, 13, 24, 7, 20, 7, 20, 0, 12, 15, 24, 21, 26, 21, 10, 21, 10, 13, 14, 27, 8, 27, 8, 11, 8, 11, 0, 15, 16, 33, 22, 9, 22, 9, 22, 9, 22, 0, 14, 17, 32, 23
Offset: 1

Views

Author

Jan Koornstra, Feb 20 2019

Keywords

Comments

It is conjectured that all starting squares will either have a finite length or reach the top row of the board at square 2 first and then follow the sequence for a(2) to infinity. A324275 contains numbers n for which A324274(n) = 0.

Examples

			a(1) is the length of A324273. a(2) has an infinite length as it will follow a repeating pattern along the top row of the numbered board.
		

Crossrefs

A316336 Numbers missing from A316334.

Original entry on oeis.org

1595, 1650, 1651, 1652, 1706, 1707, 1708, 1709, 1710, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 2000
Offset: 1

Views

Author

N. J. A. Sloane, Jul 14 2018

Keywords

Comments

A316334 is finite, so this sequence is infinite.
See A316588 and A316334 for further information.

Crossrefs

A324273 Squares visited by a single pawn move for an even square and a double pawn move for an odd square on a diagonally numbered board and moving to the lowest available unvisited square of different parity at each step.

Original entry on oeis.org

1, 4, 7, 2, 5, 12, 17, 8, 13, 6, 3, 10, 15, 26, 19, 32, 25, 14, 9, 18
Offset: 1

Views

Author

Jan Koornstra, Feb 20 2019

Keywords

Comments

The board is numbered as follows:
1 2 4 7 11 16 .
3 5 8 12 17 .
6 9 13 18 .
10 14 19 .
15 20 .
21 .
.

Examples

			Square 1 is odd. Hence the next square should be the lowest even square a double move away from 1, which is square 4. Next, there is only a single option to move in a single move to an odd square, namely at square 7. Etc.
		

Crossrefs

A324275 Numbers k for which A324274(k) is 0, i.e., starting squares in A324274 that yield a path of infinite length.

Original entry on oeis.org

2, 9, 14, 27, 34, 53, 64, 89, 102, 133, 150, 187, 206, 249, 272, 321, 346, 401, 430, 491, 522, 589, 624, 697, 734, 813, 854, 939, 982, 1073, 1120, 1217, 1266, 1369, 1422, 1531, 1586, 1701, 1760, 1881, 1942, 2069, 2134, 2267, 2334, 2473
Offset: 1

Views

Author

Jan Koornstra, Feb 27 2019

Keywords

Comments

Note that the sequence up to a(n) (for its current known values) is actually the path of a(n) in reverse until it reaches square 2. It is therefore conjectured that all starting squares in A324274 either have a finite length or are part of this single sequence.

Crossrefs

Formula

Conjectures from Colin Barker, Mar 09 2019: (Start)
G.f.: x*(2 + 7*x + 3*x^2 + 6*x^3 - x^5 + x^6) / ((1 - x)^3*(1 + x)^2*(1 + x^2)).
a(n) = (5 + 7*(-1)^n + (2-2*i)*(-i)^n + (2+2*i)*i^n + (26+6*(-1)^n)*n + 18*n^2) / 16 where i=sqrt(-1).
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7) for n>7.
(End)

A337170 Squares visited by knight moves on a diagonally back and forth numbered board and moving to the lowest available unvisited square at every step.

Original entry on oeis.org

1, 8, 4, 2, 13, 3, 6, 9, 11, 19, 5, 7, 26, 16, 14, 31, 15, 18, 12, 21, 24, 10, 23, 33, 39, 20, 22, 34, 25, 17, 28, 47, 43, 29, 27, 32, 40, 35, 37, 53, 57, 36, 58, 52, 38, 55, 80, 76, 56, 54, 59, 51, 42, 30, 45, 48, 62, 70, 44, 46, 64, 49, 41, 72, 60, 50, 63
Offset: 1

Views

Author

Sander G. Huisman, Jan 28 2021

Keywords

Comments

Board is numbered as follows:
1 3 4 10 11 .
2 5 9 12 . .
6 8 13 19 . .
7 14 18 . . .
15 17 . . . .
16 . . . . .
This sequence is finite: At step 343 square 276 is visited, after which there are no unvisited squares within one knight move.

Crossrefs

Programs

  • Mathematica
    ClearAll[ShowRoute,MakeMove,FindSequence]
    knightjump=Select[Tuples[Range[-2,2],2],Norm[#]==Sqrt[5]&];
    ShowRoute[output_Association]:=Module[{colors},colors=(ColorData["Rainbow"]/@Subdivide[Length[output["Coordinates"]]-1.0]);
    Graphics[{Line[output["Coordinates"],VertexColors->colors],Disk[Last@output["Coordinates"],0.2]}]]
    MakeMove[spiral_Association,visited_List]:=Module[{poss,hj},poss=Table[Last[Last[visited]]+hj,{hj,knightjump}];
    poss=DeleteMissing[{spiral[#],#}&/@poss,1,\[Infinity]];
    poss=Select[poss,FreeQ[visited[[All,2]],Last[#]]&];
    If[Length[poss]>0,First[TakeSmallestBy[poss,First,1]],Missing[]]]
    FindSequence[start_:{0,0},grid_]:=Module[{positions,j,next},positions={{grid[start],start}};
    PrintTemporary[Dynamic[j]];
    Do[next=MakeMove[grid,positions];
    If[next=!=Missing[],AppendTo[positions,next],Break[];],{j,\[Infinity]}];
    <|"Coordinates"->positions[[All,2]],"Indices"->positions[[All,1]]|>]
    grid=ResourceFunction["LatticePointsArrangement"]["DiagonalZigZagEastQ4",10000];
    grid=Association[MapIndexed[#1->#2[[1]]&,grid]];
    ShowRoute[fs=FindSequence[{0,0},grid]]
    fs
    fs["Indices"]
    ListPlot[fs["Indices"]]

A306527 Squares visited by a knight moving on an open-rectangle-numbered board and moving to the lowest available unvisited square at each step.

Original entry on oeis.org

1, 8, 11, 2, 5, 10, 7, 4, 9, 16, 3, 6, 13, 22, 35, 18, 21, 12, 15, 26, 23, 14, 25, 38, 55, 20, 17, 32, 47, 70, 31, 34, 49, 30, 19, 36, 53, 50, 69, 46, 93, 48, 29, 68, 95, 72, 33, 54, 37, 24, 27, 42, 39, 56, 77, 52, 71, 74, 97, 100, 51, 76, 101
Offset: 1

Views

Author

Scott R. Shannon, Feb 21 2019

Keywords

Comments

The half-infinite board is numbered from square 1 as follows:
.
| | | | | | | |
--+-------+-------+-------+-------+-------+-------+-------+--
| | | | | | | |
| 25 . . .24 . . .23 . . .22 . . .21 . . .20 . . .19 |
| . | | | | | | . |
--+---.---+-------+-------+-------+-------+-------+---.---+--
| . | | | | | | . |
| 26 | 13 . . .12 . . .11 . . .10 . . . 9 | 18 |
| . | . | | | | . | . |
--+---.---+---.---+-------+-------+-------+---.---+---.---+--
| . | . | | | | . | . |
| 27 | 14 | 5 . . . 4 . . . 3 | 8 | 17 |
| . | . | . | | . | . | . |
--+---.---+---.---+---.---+-------+---.---+---.---+---.---+--
| . | . | . | | . | . | . |
| 28 | 15 | 6 | 1 | 2 | 7 | 16 |
| | | | | | | |
--+-------+-------+-------+-------+-------+-------+-------+--
.
The knight begins at square 1. This is a finite sequence: after 326 steps square 562 is reached after which all squares within one knight move have been visited.

Crossrefs

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

Previous Showing 11-20 of 25 results. Next