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

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.

A343746 The x,y,z coordinates of the points visited by a knight on a 3D cubic lattice using the step rules given in A343678.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 0, -1, 1, 0, 0, -1, 0, 1, 1, 0, -1, 0, 0, 1, -1, 0, 0, 1, 0, -1, -1, 2, -1, -2, 1, -1, 0, -1, 0, 0, -1, 1, 2, 1, 2, 2, 2, 2, 0, 1, 0, 0, -1, -1, 0, -1, -2, 2, 1, -2, 3, 2, 0, 3, 2, -2, 2, 3, 0, 2, 3, -2, 1, 2, -2, 3, 2, -3, 1, 0, -4, 1, -2, -3, 1, -2, -2, 3, -3, 0, 3, -2, 2
Offset: 1

Views

Author

Scott R. Shannon, Apr 27 2021

Keywords

Comments

See A343678 for the rules determining the knight's steps on the cubic lattice and for images of the resulting path.

Examples

			a(1),a(2),a(3) = 0,0,0. The knight starts at the origin on the lattice.
a(4),a(5),a(6) = 0,1,2. The 24 points the knight could step to on the first step all have only 1 visited neighbor and are all the same distance from the origin. Also they all have coordinates as arrangements of 0,+-1,+-2 thus the only way they can be separated is using rules 5 and 6 of A343678 which selects the smallest magnitudes of the x,y,z coordinates followed by the largest absolute x,y,z coordinates. This leads to the point (0,1,2) being selected.
a(7),a(8),a(9) = 0,-1,1. The other two possible points which have the same number of visited neighbors and are the same distance from the origin are (1,1,0) and (-1,1,0), but (0,-1,1) is chosen as that has the minimum x-coordinate magnitude.
a(52),a(53),a(54) = -1,-2,2. This is the first point that is chosen due to having the maximum product of the absolute values of its coordinate.
a(577),a(578),a(579) = -2,-3,-1. This is the first point that is stepped to that has two visited neighboring points.
a(1978),a(1979),a(1980) = -3,3,7. This is the first point that is stepped to that has three visited neighboring points.
		

Crossrefs

Cf. A343678 (point square distances from origin), A343747 (point x coordinates), A343748 (point y coordinates), A343749 (point z coordinates) A330189, A329520, A316667.

A343748 The y coordinates of the points visited by a knight on a 3D cubic lattice using the step rules given in A343678.

Original entry on oeis.org

0, 1, -1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, 2, 2, 0, -1, -2, -2, 0, -2, 0, -2, -2, -3, -4, -3, -2, 0, 2, 3, 4, 3, 3, 2, 0, -2, -2, -2, 0, 2, 0, 2, 2, 3, 2, 1, 1, -1, -3, -3, -4, -3, -2, -3, -3, -1, 1, 2, 1, -1, -3, -1, -1, -1, -3, -3, -1, -1, 1, 1, 1, 3, 4, 3, 1, 1, 2, 3, 3, 3, 4, 4, 2, 3, 3, 3
Offset: 1

Views

Author

Scott R. Shannon, Apr 27 2021

Keywords

Comments

See A343678 for the rules determining the knight's steps on the cubic lattice and for images of the resulting path.

Crossrefs

A343678 (point square distances from origin), A343746 (point x,y,z coordinates), A343747 (point x coordinates), A343749 (point z coordinates)

A343749 The z coordinates of the points visited by a knight on a 3D cubic lattice using the step rules given in A343678.

Original entry on oeis.org

0, 2, 1, -1, 1, 0, -1, 1, -1, -2, 0, 0, 2, 2, 0, 0, 0, 2, 3, 3, 2, 2, 1, 3, 1, 1, 1, 3, 3, 3, 1, 1, -1, 0, -2, -3, -2, -4, -3, -3, -2, -2, -1, -2, 0, 2, 2, 0, 1, 1, 2, 0, -2, -4, -4, -2, -3, -3, -1, 1, 2, 2, 3, 4, 3, 2, 1, 0, -2, -1, -3, -4, -3, -1, -1, -1, 1, 3, 3, 4, 3, 1, -1, -2, -2, -4, -3
Offset: 1

Views

Author

Scott R. Shannon, Apr 27 2021

Keywords

Comments

See A343678 for the rules determining the knight's steps on the cubic lattice and for images of the resulting path.

Crossrefs

A343678 (point square distances from origin), A343746 (point x,y,z coordinates), A343747 (point x coordinates), A343748 (point y coordinates).
Showing 1-4 of 4 results.