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

A358048 Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that every number shares a digit with each of its eight surrounding neighbors.

Original entry on oeis.org

0, 10, 20, 30, 40, 50, 60, 70, 80, 18, 100, 12, 2, 23, 102, 90, 49, 104, 101, 103, 16, 105, 106, 107, 78, 8, 81, 1, 21, 22, 24, 25, 26, 29, 19, 9, 39, 91, 14, 11, 13, 15, 17, 31, 41, 51, 71, 87, 28, 38, 48, 108, 61, 112, 27, 32, 34, 42, 52, 62, 69, 59, 79, 89, 83, 93, 94, 109, 110, 111, 113
Offset: 0

Views

Author

Eric Angelini and Scott R. Shannon, Oct 27 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the nonnegative integers.

Examples

			The square spiral begins:
                           .
                           .
   49--90--102---23---2   22
   |                  |    |
  104  40---30---20   12  21
   |   |          |   |    |
  101  50    0---10  100   1
   |   |              |    |
  103  60---70---80---18  81
   |                       |
   16--105--106--107--78---8
.
a(11) = 12 as when the eleventh square is filled its surrounding neighbors are 10, 20, 100, and 12 is the smallest unused number that shares a digit with each of these three numbers.
		

Crossrefs

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

A358021 Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that no number shares a digit with any of its eight surrounding neighbors.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 30, 44, 10, 55, 11, 20, 13, 66, 12, 33, 14, 22, 15, 23, 16, 24, 57, 18, 25, 36, 27, 48, 26, 34, 56, 47, 28, 50, 49, 58, 60, 29, 35, 67, 38, 40, 77, 59, 37, 19, 68, 39, 46, 70, 41, 80, 31, 65, 90, 17, 88, 21, 93, 51, 43, 69, 71, 32, 111, 73, 81, 64, 72, 89, 42, 91
Offset: 0

Views

Author

Scott R. Shannon and Eric Angelini, Oct 24 2022

Keywords

Comments

The sequence is finite; after a(264) = 177 the square at coordinate (-8,-1) relative to the starting square is reached which has the four neighbors 177, 409, 256, 308. These numbers include all digits 0 to 9 so the next term does not exist. The largest used number is a(241) = 7777 while smallest unused number is 120.

Examples

			The square spiral begins:
                       .
                       .
  13--20--11--55--10  36
   |               |   |
  66   4---3---2  44  25
   |   |       |   |   |
  12   5   0---1  30  18
   |   |           |   |
  33   6---7---8---9  57
   |                   |
  14--22--15--23--16--24
.
a(10) = 30 as when the tenth square is filled its surrounding neighbors are 1, 2, 8, 9, and 30 is the smallest unused number that does not contain those digits.
		

Crossrefs

A358254 Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that the sum of the eight numbers around any chosen number ends in the chosen number.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 12, 8, 9, 10, 11, 13, 15, 23, 14, 16, 18, 21, 17, 19, 29, 25, 33, 20, 22, 26, 28, 120, 24, 27, 87, 58, 125, 88, 30, 31, 97, 124, 45, 187, 32, 34, 73, 132, 55, 49, 42, 35, 36, 95, 195, 59, 98, 863, 37, 38, 130, 104, 129, 62, 736, 67, 39, 40, 115, 131, 48, 748, 82, 208, 41
Offset: 0

Views

Author

Eric Angelini and Scott R. Shannon, Nov 05 2022

Keywords

Comments

The first two numbers placed when a new row or column is formed around the spiral do not complete a 3x3 block of numbers, thus they can be the lowest two numbers that have not appeared. Therefore the sequence a permutation of the nonnegative integers.
In the first 10000 terms the largest value is a(8526) = 9874588 while the smallest unused number is 902.

Examples

			The square spiral begins:
                       .
                       .
  14--23--15--13--11  120
   |               |   |
  16   4---3---2  10  28
   |   |       |   |   |
  18   5   0---1   9  26
   |   |           |   |
  21   6---7--12---8  22
   |                   |
  17--19--29--25--33--20
.
a(8) = 12 as when the ninth cell is filled it completes a ring of eight numbers around the central cell with number 0, therefore the sum of these eight numbers must end in 0. The sum around the central cell when the eighth cell is filled is 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28, and the lowest unused number that can be added so that the sum ends in 0 is 28 + 12 = 40, so a(8) = 12.
a(29) = 120 as when the thirtieth cell is filled the sum of the previous numbers around the number 10 is 13 + 11 + 2 + 28 + 1 + 9 + 26 = 90, and since 20 has already appeared the smallest unused number that can be added to 90 to form a number that ends in 10 is 120.
		

Crossrefs

A358129 Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that no number shares a digit with any of its four orthogonally adjacent neighbors.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon and Eric Angelini, Oct 30 2022

Keywords

Comments

This sequence is similar to A358021 except here only the four orthogonally adjacent neighbors are considered. It is unknown if the sequence eventually terminates; if it does, it does so after more than 1.5 million terms. In that range on numerous occasions the only available number is one containing only the digit 7. For example a(862833) = 7...7, where there are forty-nine 7's.

Examples

			The square spiral begins:
                       .
                       .
  25--13--24--10--22  19
   |               |   |
  16   4---3---2  11  27
   |   |       |   |   |
  23   5   0---1  20  18
   |   |           |   |
  14   6---7---8---9  33
   |                   |
  26--15--28--17--30--12
.
a(10) = 20 as when the tenth cell is filled its two orthogonal neighbors use the digits 1 and 9, and 20 is the smallest unused number that does not contain either of those digits.
		

Crossrefs

Showing 1-5 of 5 results.