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-10 of 17 results. Next

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

A335816 Squares visited by a chess king moving on a square-spiral numbered board where the king moves to the adjacent unvisited square containing the spiral number with the fewest divisors. In case of a tie it chooses the square with the lowest spiral number.

Original entry on oeis.org

1, 2, 3, 11, 29, 13, 31, 59, 33, 61, 97, 139, 191, 251, 193, 141, 142, 143, 101, 65, 37, 17, 5, 19, 7, 23, 47, 79, 49, 25, 9, 8, 6, 4, 14, 15, 34, 35, 62, 63, 98, 99, 64, 66, 67, 103, 149, 201, 263, 331, 409, 493, 587, 586, 687, 797, 689, 589, 691, 591, 499, 593, 501
Offset: 1

Views

Author

Scott R. Shannon, Jun 25 2020

Keywords

Comments

This sequences gives the numbers of the squares visited by a chess king moving on a square-spiral numbered board where the king starts on the 1 numbered square and at each step moves to an adjacent unvisited square, out of the eight adjacent neighboring squares, which contains the number with the fewest divisors. If two or more adjacent squares exist with the same fewest number of divisors then the square with the lowest spiral number is chosen. Note that if the king simply moves to the smallest available number, as the knight does in A316667, the sequence will be infinite as the king will just follow the square spiral path.
The sequence is finite. After 411 steps the square with number 760 is visited, after which all adjacent neighboring squares have been visited.
Due to the king's preference for squares with the fewest divisors it will move to a prime numbered square when possible, and the lowest prime if two or more unvisited primes are in adjacent squares. Of the 411 visited squares 134 contain prime numbers while 277 contain composites. The largest visited square is a(365) = 3061.

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 for the king.
a(2) = 2. The eight unvisited squares around a(1) the king can move to are numbered 2,3,4,5,6,7,8,9. Of these 2,3,5,7 have the minimum two divisors, and of those 2 is the smallest.
a(4) = 11. The six unvisited squares around a(3) = 3 the king can move to are numbered 4,11,12,13,14,15. Of these 11 and 13 have the minimum two divisors, and of those 11 is the smallest.
		

Crossrefs

A333714 Squares visited by a chess king moving on a square-spiral numbered board where the king moves to the adjacent unvisited square containing the spiral number with the most divisors. In case of a tie it chooses the square with the highest spiral number.

Original entry on oeis.org

1, 8, 24, 48, 80, 120, 168, 224, 288, 360, 440, 528, 624, 728, 840, 960, 1088, 1224, 1368, 1520, 1680, 1848, 2024, 2208, 2400, 2600, 2808, 3024, 3248, 3480, 3720, 3968, 4224, 4488, 4760, 5040, 5328, 5624, 5928, 6240, 6560, 6888, 7224, 7568, 7920, 8280, 8648, 9024, 9408, 9800, 10200, 10608
Offset: 1

Views

Author

Scott R. Shannon, Jul 02 2020

Keywords

Comments

This sequence gives the numbers of the squares visited by a chess king moving on a square-spiral numbered board where the king starts on the 1 numbered square and at each step moves to an adjacent unvisited square, out of the eight adjacent neighboring squares, which contains the number with the most divisors. If two or more adjacent squares exist with the same highest number of divisors then the square with the highest spiral number is chosen. Given both of these rules tend to force the king to squares with larger numbers, and thus move away from the central 1 starting square, it is remarkable that the king is eventually trapped. Note that if the king simply moves to the highest available number the sequence will be infinite as the king will step along the southeast diagonal from square 1 forever.
The sequence is finite. After 1113 steps the square with number 855481 is visited, after which all adjacent neighboring squares have been visited.
Due to the king's preference for squares with the most divisors it will avoid prime numbers unless no other choice exists. Of the 1113 visited squares only once does it visit a square with a prime number, at a(308) = 108223. This is due to a(307) = 106913 having square 108223 as its sole neighboring unvisited square. This is the only time in the sequence where only one unvisited adjacent neighbor is available.
As even numbers >= 6 will always contain 4 or more divisors the king will tend to visit more even numbers than odd numbers; in the 1113 visited squares 929 contain an even number while only 184 contain an odd number.
As the even numbers are diagonally adjacent in the square spiral the king's path will be dominated by diagonal steps, often taking many diagonal steps in succession - see the attached link image. In fact after the first downward step to 8 the next 110 steps are along the southeast diagonal, stepping to successively larger even numbers. This sequence is finally broken on the 112th step when the square with number 50624, with 28 divisors, is the next square in the southeast direction. However the square with number 50622, with 32 divisors, is in the southwest direction so is the next square chosen. It is not until the 166th step, to the square with number 108230, that the path takes a step to a lower number than the one it is currently on.
The largest visited square is a(1050) = 942676. The visited square with the maximum number of divisors is a(680) = 388080, which has 180 divisors. The lowest unvisited square is 2.

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 for the king.
a(2) = 8. The eight unvisited squares around a(1) the king can move to are numbered 2,3,4,5,6,7,8,9. Of these 6 and 8 both have the maximum four divisors, and of those 8 is the largest.
a(3) = 24. The seven unvisited squares around a(2) = 8 the king can move to are numbered 9,2,6,7,22,23,24. Of these 24 has eight divisors, the largest number.
a(113) = 50622. The seven unvisited squares around a(112) = 49728 the king can move to are numbered 50622, 49727, 50623, 48841, 50624, 49729, 48842. Of these 50622 has thirty-two divisors, the largest number. This is the step that breaks the sequence of 110 steps to the southeast direction starting from a(2) = 8.
a(308) = 108223. This is the first and only time a prime number is visited; a(307) = 106913 has square 108223 as the sole unvisited adjacent neighbor.
a(1114) = 855481. The two unvisited squares around a(1113) = 859184 the king can move to are numbered 862894 and 855481. Of these 855481 has eight divisors, the largest number. However square 855481 is surrounded by the eight squares with numbers 859183, 855480, 851785, 859184, 851786, 859185, 855482, 851787 all of which have been previously visited, so the king is trapped.
		

Crossrefs

Cf. A333713 (choose lowest spiral number in case of tie), A335816, A316667, A330008, A329520, A326922, A328928, A328929, A033996.

A343678 The square of the distance from the origin for the points visited by a knight moving on a 3D cubic lattice using the rules given in the Comments.

Original entry on oeis.org

0, 5, 2, 1, 2, 1, 2, 1, 2, 9, 2, 1, 6, 9, 8, 1, 2, 9, 14, 13, 12, 13, 14, 17, 14, 17, 14, 17, 18, 17, 14, 17, 10, 13, 12, 13, 12, 21, 14, 13, 12, 13, 14, 9, 10, 9, 14, 17, 18, 19, 14, 17, 14, 21, 26, 17, 14, 19, 14, 11, 14, 17, 14, 17, 14, 17, 26, 17, 14, 11, 14, 17, 18, 17, 14, 11, 18, 29, 22, 25
Offset: 1

Views

Author

Scott R. Shannon, Apr 25 2021

Keywords

Comments

Consider a knight, starting at the origin of a 3D cubic lattice, which can only move to the 24 neighboring points one knight-leap away which have not been previously visited and where the choice of point for its next step is given by the following rules. 1. Move to the neighboring point which itself has the fewest visited neighboring points one knight-leap away from it. 2. If two or more points have the same visited neighbor count move to one of those points which is the closest to the origin. 3. If two or more points are the same distance from the origin move to one of those points which has the maximum value for the product of the absolute values of its x, y and z coordinates. 4. If two or more points have the same maximum coordinate product move to one of those points which has the maximum value for the sum of the absolute values of its x, y and z coordinates. 5. If two or more points have the same maximum coordinate sum move to the point with the smallest x-coordinate absolute value, then if equal the smallest y-coordinate absolute value, then if equal the smallest z-coordinate absolute value. 6. If still equal move to the point with the largest x-coordinate, then if equal the largest y-coordinate, then if equal the largest z-coordinate.
The sequence gives the square of the distance from the origin for the points visited by a knight following these rules.
The sequence is finite. After 811351 steps the point with coordinates (-3,2,0) is reached after which all 24 neighboring points one knight-leap away have been visited.
Rules 1 and 2 are the most important and must be taken in the given order for the knight to be trapped within 2 million steps. As in A330189 it would appear that first choosing a neighbor with the fewest visited neighbors would force the knight to move away from the origin and be less likely to be trapped. But the opposite is true as, although the knight does move away from the origin at first, its path leaves regions of unvisited points which are large enough that the knight will eventually go back into these regions and be forced toward the origin where it cannot escape. If instead for each step we first choose a point as close as possible to the origin the knight will densely cover all points close to the origin and leave very few or no unvisited regions which can later be visited. This results in a spherical region of visited points that grows further and further out from the origin which cannot readily be penetrated and so the knight is forced to continuously move outward. Switching rules 1 and 2 leads to a path of at least 250 million steps without being trapped, and it is unknown if the knight is ever trapped in this case.
Rules 3 to 6 are more arbitrary due to there being no simple equivalent in 3D for the 2D square-spiral numbering. Many orderings of these rules are possible, and one can also change the largest or smallest test condition to its opposite for the tests within these rules. Each will create a knight path with a different number of steps before being trapped. For example switching rules 3 and 4 results in the path being trapped after 1101154 steps. The rules given result in the shortest path before being trapped so far found for various combinations tested, although shorter paths probably exist. But all combinations so far tested with rule 1 and 2 as given all result in the knight eventually being trapped, indicating these are the required conditions for such paths.
See A343746 for the x,y,z coordinates of the visited points and examples of the points chosen.
See A343747 for the x coordinates of the visited points.
See A343748 for the y coordinates of the visited points.
See A343749 for the z coordinates of the visited points.

Crossrefs

Cf. A343746 (point x,y,z coordinates), A343747 (point x coordinates), A343748 (point y coordinates), A343749 (point z coordinates), A330189, A329520, A316667.

A333713 Squares visited by a chess king moving on a square-spiral numbered board where the king moves to the adjacent unvisited square containing the spiral number with the most divisors. In case of a tie it chooses the square with the lowest spiral number.

Original entry on oeis.org

1, 6, 18, 40, 70, 108, 72, 42, 20, 21, 44, 45, 75, 114, 160, 216, 280, 350, 351, 352, 432, 520, 616, 720, 832, 952, 1080, 1216, 1360, 1512, 1672, 1840, 2016, 2200, 2392, 2592, 2800, 3016, 3240, 3472, 3710, 3956, 4212, 4476, 4746, 5024, 5310, 5022, 4743, 4472, 4473, 4209, 4208, 3952, 3705
Offset: 1

Views

Author

Scott R. Shannon, Jul 02 2020

Keywords

Comments

This sequences gives the numbers of the squares visited by a chess king moving on a square-spiral numbered board where the king starts on the 1 numbered square and at each step moves to an adjacent unvisited square, out of the eight adjacent neighboring squares, which contains the number with the most divisors. If two or more adjacent squares exist with the same highest number of divisors then the square with the lowest spiral number is chosen. Note that if the king simply moves to the highest available number the sequence will be infinite as the king will step along the south-east diagonal from square 1 forever.
The sequence is finite. After 1784 steps the square with number 1478 is visited, after which all adjacent neighboring squares have been visited.
Due to the king's preference for squares with the most divisors it will avoid prime numbers unless no other choice exists. Of the 1784 visited squares only 27 contain prime numbers while 1757 contain composites. As even numbers >= 6 will always contain 4 or more divisors the king will tend to visit more even numbers than odd numbers; in the 1784 visited squares 1289 contain an even number while 495 contain an odd number. As the even numbers are diagonally adjacent in the square spiral the king's path will be dominated by diagonal steps, often taking numerous diagonal steps is succession - see the attached link image.
The largest visited square is a(390) = 17664. The lowest unvisited square is 2.

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 for the king.
a(2) = 6. The eight unvisited squares around a(1) the king can move to are numbered 2,3,4,5,6,7,8,9. Of these 6 and 8 both have the maximum four divisors, and of those 6 is the smallest.
a(3) = 18. The seven unvisited squares around a(2) = 6 the king can move to are numbered 4,5,18,19,20,7,8. Of these 18 and 20 have the maximum six divisors, and of those 18 is the smallest.
a(603) = 821. This is the first prime number visited; a(602) = 939 has square 821 as the sole unvisited adjacent neighbor.
		

Crossrefs

Cf. A333714 (choose highest spiral number in case of tie), A335816, A316667, A330008, A329520, A326922, A328928, A328929.

A335844 Squares visited by a knight moving on a square-spiral numbered board where the knight moves to the unvisited square containing the spiral number with the fewest divisors. In case of a tie it chooses the square with the lowest spiral number.

Original entry on oeis.org

1, 10, 3, 6, 17, 4, 7, 2, 5, 8, 11, 14, 29, 86, 27, 12, 31, 94, 61, 16, 19, 22, 41, 106, 67, 18, 37, 62, 139, 98, 191, 142, 97, 34, 13, 58, 89, 178, 127, 52, 83, 26, 47, 118, 163, 76, 23, 20, 43, 70, 109, 74, 71, 44, 73, 158, 113, 214, 157, 274, 271, 212, 277, 346, 211
Offset: 1

Views

Author

Scott R. Shannon, Jun 26 2020

Keywords

Comments

This sequences gives the numbers of the squares visited by a knight moving on a square-spiral numbered board, as described in A316667, where at each step the knight goes to the neighbor one knight-leap away which contains the number with the fewest divisors. If two or more neighbors exist with the same fewest number of divisors then the square with the lowest spiral number is chosen.
The sequence is finite. After 528 steps the square with number 33 is visited, after which all neighboring squares have been visited.
Due to the knight's preference for squares with the fewest divisors the knight will leap to a prime numbered square when possible, and the lowest prime if two or more unvisited primes are within one knight-leap. Therefore this sequence matches A330008 for the first 13 terms, but on the 13th step the square with number 86 is chosen as no primes are available and 86 has only four divisors, while A330008 chooses 32, the smallest available number, but which has six divisors.
Of the 528 visited squares 198 contain prime numbers while 330 contain composites. The largest visited square is a(410) = 3656.

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 for the knight.
a(2) = 10. The eight unvisited squares the knight can leap to from a(1) are numbered 10,12,14,16,18,20,22,24. Of these 10,14,22 have the minimum four divisors, and of those 10 is the smallest.
		

Crossrefs

A336092 Squares visited by a chess king moving on a square-spiral numbered board where the king moves to the adjacent unvisited square containing the spiral number with the fewest divisors. In case of a tie it chooses the square with the largest spiral number.

Original entry on oeis.org

1, 7, 23, 47, 79, 49, 25, 9, 11, 29, 53, 87, 127, 177, 233, 299, 373, 454, 543, 641, 746, 859, 979, 1109, 1247, 1393, 1249, 1111, 983, 863, 751, 647, 753, 866, 865, 985, 1115, 1253, 1399, 1553, 1714, 1883, 2059, 2243, 2437, 2638, 2846, 3063, 3287, 3061, 2843, 2633, 2841, 3057, 3281, 3513, 3755
Offset: 1

Views

Author

Scott R. Shannon, Jul 08 2020

Keywords

Comments

This sequences gives the numbers of the squares visited by a chess king moving on a square-spiral numbered board where the king starts on the 1 numbered square and at each step moves to an adjacent unvisited square, out of the eight adjacent neighboring squares, which contains the number with the fewest divisors. If two or more adjacent squares exist with the same fewest number of divisors then the square with the largest spiral number is chosen. Note that if the king simply moves to the largest available number the sequence will be infinite as the king will step along the south-east diagonal from square 1 forever.
The sequence is finite. After 21276 steps the square with spiral number 281747427 is visited, after which all adjacent neighboring squares have been visited. The end square is extremely far from the starting square, approximately 8860 units away, as the king is drawn generally outward due to its preference for the largest numbered square when the divisor counts are tied - see the link image. This end square spiral number is currently the largest for any square spiral single-visit trapped knight or trapped king path in the OEIS.
Due to the king's preference for squares with the fewest divisors it will move to a prime numbered square when possible, and the lowest prime if two or more unvisited primes are in adjacent squares. Of the 21276 visited squares 4363 contain prime numbers while 16913 contain composites. The largest visited square is a(21208) = 282486458.

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 for the king.
a(2) = 7. The eight unvisited squares around a(1) the king can move to are numbered 2,3,4,5,6,7,8,9. Of these 2,3,5,7 have the minimum two divisors, and of those 7 is the largest.
a(3) = 23. The seven unvisited squares around a(2) the king can move to are numbered 6,8,19,20,21,22,23. Of these 19 and 23 have the minimum two divisors, and of those 23 is the largest.
		

Crossrefs

Cf. A335816 (choose lowest number in case of tie), A333713, A333714, A316667, A330008, A329520, A326922.

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

A330189 Squares visited by a knight moving on a square-spiral numbered board where the knight moves to the unvisited square with the fewest visited neighbors. In case of a tie it chooses the square with the lowest spiral number.

Original entry on oeis.org

1, 10, 3, 6, 9, 4, 7, 2, 25, 50, 79, 116, 45, 74, 71, 106, 67, 36, 61, 94, 31, 54, 89, 128, 175, 84, 81, 118, 163, 76, 113, 72, 107, 68, 37, 62, 95, 136, 59, 56, 87, 126, 83, 172, 169, 82, 171, 224, 285, 354, 431, 516, 349, 426, 275, 210, 213, 112, 157, 208, 267, 334, 263, 200, 101, 66, 63, 38, 65, 144, 193, 250, 315, 246, 137, 186, 133, 238, 183, 134, 181
Offset: 1

Views

Author

Scott R. Shannon (following a suggestion by M. F. Hasler), Dec 04 2019

Keywords

Comments

This sequences gives the numbers of the squares visited by a knight moving on a square-spiral numbered board, as described in A316667, where at each step the knight goes to the neighbor one knight-leap away which has the fewest visited neighbors. If two or more neighbors exist with the same lowest neighbor count then, from that list of squares, the square with the lowest spiral number is chosen.
The sequence is finite. After 656 steps the square with number 273 is visited, after which all neighboring squares have been visited.
The first step where the knight has only one neighbor to choose from in the list of neighboring squares with the fewest visited neighbors is at step 39 where only neighboring square 56 has one visited neighbor. The first step where the neighboring squares all have two or more visited neighbors is at step 146 where neighboring squares 443, 533, and 535 all have two visited neighbors.
Like the walks in A329520 it is not immediately obvious that this will be a finite walk as one may believe the knight would be constantly moving away from the origin and thus never be trapped. But like in those walks, the knight here leaves gaps in its path as it moves away from the origin, which will subsequently be visited due to the knight's preference of choosing the square with the smallest spiral number when two or more squares with the same neighbor count are encountered. This draws the knight toward the origin where it will eventually be trapped.

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

Showing 1-10 of 17 results. Next