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-7 of 7 results.

A329519 Squares visited by a knight moving on a square-spiral numbered board where the knight moves to an unvisited square with the lowest spiral number and with six or fewer visited neighbors. It only moves to squares with seven or more visited neighbors when no other square is available; if two or more such squares are present it chooses the square with the fewest neighbors, then the square with the lowest spiral number if still tied.

Original entry on oeis.org

1, 10, 3, 6, 9, 4, 7, 2, 5, 8, 11, 14, 29, 32, 15, 12, 27, 24, 45, 20, 23, 44, 41, 18, 35, 38, 19, 16, 33, 30, 53, 26, 47, 22, 43, 70, 21, 40, 17, 34, 13, 28, 25, 46, 75, 42, 69, 104, 37, 62, 95, 58, 55, 86, 51, 48, 77, 114, 73, 108, 151, 68, 103, 64, 67, 36
Offset: 1

Views

Author

Scott R. Shannon, Nov 18 2019

Keywords

Comments

This is a variation of A316667. The same knight move rules apply, but the knight will not move to a square which has seven or eight visited neighbors unless no other square is available. If the only unvisited squares available to move to have seven or eight neighbors it will choose the one with the lowest number of neighbors first, and if a tie still exists it will choose the one with the smallest spiral number.
The sequence is finite. After 3935788 steps the square with spiral number 3352743 is reached after which all surrounding squares have been visited. This is the longest possible path using the given knight-leap rules for the eight possible values of visited neighbor count. A329520 gives the other path lengths.
The sequences matches the values of A316667 for the first 332 terms, but on the 332nd step the knight sees that square 193 has seven visited neighbors and thus chooses square 393 instead. Along its path the knight encounters 38812 squares where it would have chosen a square with seven or eight neighbors if only the lowest spiral number was considered; 21897 squares had seven neighbors, 16915 squares had eight neighbors. Of those squares thirteen times a square with seven neighbors was actually chosen due to no other square with a lower neighbor count being available. The first such encounter is after 380990 steps while on the square with number 295910. On this first encounter a square with eight neighbors is also available, and has a lower board number than the square with seven neighbors. Thus if the rules were changed to always select the lowest board number regardless of the number of neighbors in such cases then the knight would choose the eight-neighbor square and thus be trapped after 380990 steps.
Due to the knight's avoidance of trapping or potentially trapping squares numerous squares which are inside the knight's overall path are never visited; the first such example is square 193 mentioned above. This is in contrast to standard knight's tours which typically cover all internal squares.

Examples

			See A316667 for the spiral board numbering.
		

Crossrefs

A329518 Squares visited by a knight moving on a square-spiral numbered board where the knight moves to an unvisited square with the lowest spiral number and with seven or fewer visited neighbors. It only moves to squares with eight visited neighbors when no other square is available.

Original entry on oeis.org

1, 10, 3, 6, 9, 4, 7, 2, 5, 8, 11, 14, 29, 32, 15, 12, 27, 24, 45, 20, 23, 44, 41, 18, 35, 38, 19, 16, 33, 30, 53, 26, 47, 22, 43, 70, 21, 40, 17, 34, 13, 28, 25, 46, 75, 42, 69, 104, 37, 62, 95, 58, 55, 86, 51, 48, 77, 114, 73, 108, 151, 68, 103, 64, 67, 36
Offset: 1

Views

Author

Scott R. Shannon, Nov 18 2019

Keywords

Comments

This is a variation of A316667. The same knight move rules apply, but the knight will not move to a square which will result in it being trapped (the square will have eight visited surrounding neighbors) unless no other squares are available. If the only squares available will all result in the knight being trapped it will choose the one with the lowest board spiral number.
The sequence is finite. After 23014 steps the square with spiral number 25809 is reached after which all surrounding squares have been visited. This is the third largest possible path using the given knight-leap rules for the eight possible values of visited neighbor count. A329520 gives the other path lengths.
The sequences matches the values of A316667 for the first 2015 terms, but on the 2015th step the knight sees that square 2084 will result in it being trapped and thus chooses square 2668 instead. Along its path the knight encounters sixteen squares where it would be trapped if it had chosen the smallest numbered available square. These occurs after steps 2015, 2983, 3116, 3372, 7485, 8775, 9726, 10971, 11845, 11918, 12140, 18477, 18706, 19921, 22223, 23014. The corresponding board numbers which were rejected are given by the first fifteen values of A323714. On step 23014 there is only one square available which is it forced to move to, resulting in it being trapped on square 25809, the sixteenth entry of A323714.

Examples

			See A316667 for the spiral board numbering.
		

Crossrefs

A343356 Squares visited by a knight moving on a square-spiral with numbers equal to the ordered prime factors of the positive integers and where the knight moves to the smallest numbered unvisited square; the minimum distance from the origin is used if the square numbers are equal; the smallest ordered spiral number is used if the distances are equal.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 5, 2, 2
Offset: 1

Views

Author

Scott R. Shannon, Apr 12 2021

Keywords

Comments

Many of the visited squares are numbered 2 due to the large number of such terms on the board and the knight's preference for the lowest available numbered square.
The sequence is finite. After 369 steps the square with spiral number 3, with ordered spiral number 522, is reached after which all eight adjacent squares have been visited. The visited square with the largest spiral number is 41.
See A343385 for the visited squares given as the ordered spiral numbers.

Examples

			The square-spiral starts with 1 and is then numbered with the ordered prime factors of the positive integers as follows:
.
  11---5---2---3---3   .
   |               |   .
   2   2---2---3   2   2
   |   |       |   |   |
   2   5   1---2   2   2
   |   |           |   |
   3   2---3---7---2   2
   |                   |
  13---2---7---3---5---2
.
a(1) = 1, the starting square of the knight.
a(2) = 2. Four squares the knight can step to from the starting square are numbered 2, all of which are the same distance form the origin, so the 2 with the lowest spiral number is chosen. This is the 2 at coordinates (2,-1) relative to the starting square which has an ordered spiral number of 10.
a(35) = 3. This is the first time a square greater than 2 is stepped to. The available squares after 33 steps are 3, 3, 3, 11, 5, and 47, and the 3 at coordinates (1,4) relative to the starting square is chosen because it is the closest number to that square.
a(365) = 41. This is the largest numbered square that is stepped to. The available squares after the 363rd step are 41, 157, 313, and 43, and 41 is the smallest of these.
a(370) = 3. This is the final square stepped to as no further unvisited square is available.
		

Crossrefs

A343388 Squares visited by a knight moving on a square-spiral with numbers equal to the ordered divisors of the positive integers and where the knight moves to the smallest numbered unvisited square; the minimum distance from the origin is used if the square numbers are equal; the smallest ordered spiral number is used if the distances are equal.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 5, 1, 1, 3, 1, 4, 1, 1, 8, 1, 3, 2, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Scott R. Shannon, Apr 13 2021

Keywords

Comments

Many of the visited squares are numbered 1 due to the large number of such terms on the board and the knight's preference for the lowest available numbered square.
The sequence is finite. After 358 steps the square with spiral number 13, with ordered spiral number 37, is reached after which all eight adjacent squares have been visited. The visited square with the largest spiral number is 28.
See A343389 for the visited squares given as the ordered spiral numbers.

Examples

			The square-spiral is numbered with the ordered divisors of the positive integers as follows:
.
   1---7---1---6---3   .
   |               |   .
   2   3---1---2   2   11
   |   |       |   |   |
   4   1   1---1   1   1
   |   |           |   |
   8   2---4---1---5   10
   |                   |
   1---3---9---1---2---5
.
a(1) = 1, the starting square of the knight.
a(2) = 1. One square numbered 1 can be stepped to from the starting square, the square with coordinates (1,-2) relative to that square.
a(9) = 2. This is the first time a square greater than 1 is stepped to. The available squares after 7 steps are 3, 11, 10, 2, 9, 2, and 3. The 2 at coordinates (-1,-1) relative to the starting square is because it is the closest number to that square.
a(146) = 28. This is the largest numbered square that is stepped to. The available squares after the 144th step are 117, 213, 47, 70, 61, and 28, and 28 is the smallest of these.
a(359) = 13. This is the final square stepped to as no further unvisited square is available.
		

Crossrefs

A336208 Squares visited by a knight on a square-spiral numbered board and moving to the lowest available unvisited square at each step, where the step is not in the same direction as the previous step.

Original entry on oeis.org

1, 10, 3, 6, 9, 4, 7, 2, 5, 8, 11, 14, 29, 32, 15, 12, 27, 24, 49, 52, 25, 28, 13, 34, 17, 40, 21, 46, 75, 22, 19, 16, 33, 30, 53, 26, 47, 80, 51, 48, 23, 44, 41, 18, 37, 62, 99, 36, 39, 20, 43, 70, 109, 42, 45, 74, 71, 110, 113, 72, 111, 154, 73, 108
Offset: 1

Views

Author

Scott R. Shannon, Jul 12 2020

Keywords

Comments

This is a variation of A316667. The same knight move rules apply, but at each step the knight cannot move in the same direction as its previous step.
The sequence is finite. After 217 steps the square with spiral number 118 is reached after which all surrounding squares have been visited.
The first term where this sequence differs from A316667 is a(19) = 49. The previous step was from a(17) = 27 to a(18) = 24, a step 1 unit down and 2 units to the left. The minimum unvisited spiral number one knight leap away from 24 is 45, but that is also in a direction 1 unit down and 2 units to the left, so cannot be chosen. The next closest unvisited square is 49, 1 unit down and 2 units to the right.

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(1) = 1, the starting square of the knight.
a(2) = 10. The eight unvisited squares one knight leap away from a(1) are numbered 10,12,14,16,18,20,22,24. Of these 10 is the lowest.
a(19) = 49. The four unvisited squares one knight leap away from a(18) = 24 are numbered 45,49,77,79. Of these 45 is the lowest but that would require a step 1 unit down and 2 units left from 24, which is the same step as a(17) = 27 to a(18) = 24, so is not allowed. The next lowest available square is 49.
		

Crossrefs

A343385 The ordered square spiral numbers visited by the knight in A343356.

Original entry on oeis.org

1, 10, 29, 2, 5, 40, 7, 4, 11, 26, 83, 174, 123, 84, 27, 12, 15, 18, 35, 64, 97, 36, 65, 142, 63, 66, 149, 102, 143, 146, 103, 100, 141, 62, 33, 58, 55, 28, 87, 178, 131, 92, 31, 54, 13, 60, 139, 248, 191, 316, 247, 136, 91, 182, 185, 132, 237, 300, 371, 450, 295, 228, 173, 82, 49, 78, 45, 74
Offset: 1

Views

Author

Scott R. Shannon, Apr 13 2021

Keywords

Comments

This is the ordered square-spiral numbers visited by a knight on a square spiral as numbered in A343356. See that sequence for further details.

Crossrefs

A343389 The ordered square-spiral numbers visited by the knight in A343388.

Original entry on oeis.org

1, 24, 11, 4, 9, 6, 15, 2, 7, 46, 21, 72, 75, 42, 19, 38, 105, 202, 151, 104, 147, 262, 199, 102, 67, 36, 61, 32, 3, 28, 51, 124, 85, 128, 53, 30, 59, 96, 141, 250, 189, 316, 251, 392, 315, 474, 563, 660, 769, 1006, 767, 658, 879, 762, 555, 462, 553, 756, 873, 998, 761, 556, 381, 460, 305
Offset: 1

Views

Author

Scott R. Shannon, Apr 13 2021

Keywords

Comments

This is the ordered square-spiral numbers visited by a knight on a square spiral as numbered in A343388. See that sequence for further details.

Crossrefs

Showing 1-7 of 7 results.