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.

A343530 Number of steps before being trapped for a knight moving on a square-spiral base-n numbered board when stepping to the closest unvisited square which contains a number that shares no digit with the number of the current square. If two or more such squares are the same distance away the one with the smaller number is chosen.

Original entry on oeis.org

0, 1, 12, 10, 13, 16, 35, 51, 56, 90, 42, 84, 99, 129, 156, 30, 220, 184, 201, 79, 321, 25, 424, 301, 389, 29, 32, 311, 328, 186, 129, 42, 101, 97, 144, 52, 534, 83, 506, 885, 233, 472, 43, 410, 145, 210, 482, 51, 57, 144, 53, 60, 148, 248, 83, 80, 180, 72, 55
Offset: 2

Views

Author

Scott R. Shannon and Eric Angelini, Apr 19 2021

Keywords

Examples

			The board in base 10 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(2) = 0 as on a base-2 numbered spiral all surrounding squares contain a 1 digit in their number thus, as the knight starts on the square numbered 1, it has no square to move to which does not contain a 1 digit.
a(3) = 1 as on a base-3 numbered board there are two squares the knight can step to which do not contain a 1 digit -- the squares numbered 200_3 = 18 and 220_3 = 24. The knight steps to 200_3 as it is the lowest numbered square, but after that there are no surrounding unvisited squares the knight can step to which do not contain the digit 0 or 2.
a(4) = 12 as on a base-4 numbered board the knight steps to squares 22_4 = 10, 3_4 = 3, 12_4 = 6, 33_4 = 15, 2_4 = 2, 11_4 = 5, 20_4 = 8, 111_4 = 21, 220_4 = 40, 13_4 = 7, 222_4 = 42, 103_4 = 19. The knight is then trapped as no unvisited square containing only the digit 2 is one knight step away.
See the linked images for other examples.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = 2015 for any n >= 2979. - Rémy Sigrist, Jun 16 2021

Extensions

More terms from Rémy Sigrist, Jun 16 2021

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.

A343563 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 smallest digit sum. In case of a tie it chooses the lowest number.

Original entry on oeis.org

1, 10, 3, 30, 11, 4, 13, 2, 5, 20, 23, 6, 21, 40, 105, 202, 103, 100, 141, 250, 315, 190, 251, 140, 61, 14, 31, 12, 15, 32, 55, 130, 91, 180, 301, 234, 127, 52, 25, 50, 121, 222, 119, 220, 117, 80, 51, 124, 231, 126, 53, 26, 9, 22, 41, 106, 203, 104, 201, 102, 143, 252, 321, 480, 323, 400, 403
Offset: 1

Views

Author

Scott R. Shannon, Apr 19 2021

Keywords

Comments

This sequences gives the numbers of the squares visited by a knight moving on a square-spiral numbered board where at each step the knight moves to the unvisited neighbor one knight-leap away which contains the number with the smallest digit sum. If two or more neighbors exist with the same digit sum then from those squares the one with the lowest number is chosen.
The sequence is finite. After 790 steps the square with number 69 is visited, after which all eight neighboring squares have been visited. The largest visit spiral number is a(626) = 6112, while there are four squares with the largest visited digit sum of 19: a(373) = 2683, a(539) = 2737, a(590) = 2944, a(594) = 2728.

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(2) = 10 as the eight unvisited neighbors of the square a(1) = 1 are numbered 10,12,14,16,18,20,22,24, and 10, with a digit sum of 1, has the lowest digit sum of these.
a(4) = 30 as the seven unvisited neighbors of the square a(3) = 3 square are numbered 6,8,28,30,32,34,16, and 30, with a digit sum of 3, has the lowest digit sum of these.
a(9) = 5 as two of the unvisited neighbors of the square a(8) = 2 are 5 and 23, both of which have a digit sum of 5, but 5 is chosen as it is the lower number.
		

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