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

A358151 Earliest infinite sequence of distinct integers on a square spiral such that every number equals the sum of its eight adjacent neighbors. See the Comments.

Original entry on oeis.org

0, 1, -1, 2, -2, 3, -3, 4, -4, -5, -6, 11, 5, 6, -20, 15, 8, 7, -17, 12, 9, 18, -32, 21, 13, -8, 16, -38, 14, 30, -7, -11, -37, 57, -60, 23, -9, 10, 24, -34, -24, 60, -10, -13, -31, 72, -109, 82, 20, -12, -14, -108, 182, -142, -28, 188, -15, -16, -160, 168, -82, 67, -128, 120, -21, 22, -43, -22
Offset: 0

Views

Author

Scott R. Shannon, Nov 01 2022

Keywords

Comments

We define earliest as the number with the smallest magnitude, and where a positive number is considered earlier than its negative value.
Numerous conditions must be met when choosing the next earliest available number so the sequence is infinite. The main consideration is that the first two numbers chosen in any new row or column totally determine the remaining values in that row/column. Usually these two terms will be the earliest unused numbers, although sometimes that is not possible. See the examples below and the attached text file explaining the selection criteria. Once these two numbers are chosen the other values tend to be larger in magnitude at the start and end of the row/column than in its middle, although all of these values are generally much much larger than the initial two terms. See the first linked image.
The values that are positive and negative make a pattern around the spiral axes; see the second linked image. There is no occurrence in the first 250000 terms where a positive number is surrounded by eight negative numbers, or vice versa. It is unknown is this can occur.
The sequence is conjectured to be a permutation of the integers. The values grow rapidly in size, e.g., in the first 1000 terms the largest magnitude number is a(899) = 3585008350, while the largest magnitude number in the first 100000 terms is a(99854) = -128...904, a number containing 103 digits.
The author thanks Eric Angelini whose sequence A358254 was the inspiration for this one.

Examples

			The square spiral begins:
.                            .
                             .
    8...15...-20...6....5     30
    |                   |     |
    7   -2....2...-1    11    14
    |    |         |    |     |
  -17    3    0....1   -6    -38
    |    |              |     |
   12   -3....4...-4...-5     16
    |                         |
    9...18...-32...21...13...-8
.
.
See the attached text file for a larger 31 by 31 example.
a(0) = 0. The earliest available integer.
a(1)..a(8) = 1,-1,2,-2,3,-3,4,-4. These are the earliest available eight numbers that sum to a(0) = 0 as required.
a(9) = -5. Despite this being a term where a seemingly free choice can be made, the earliest available number, 5, cannot be chosen; it is not immediately obvious as to why 5 fails since the addition of this number does not complete a new 3 by 3 block of numbers. See the attached text file for an explanation.
a(10) = -6. Given that a(9) = -5 the next number cannot be either 5 or 6 since those choices would force a(11) to equal 0 or -1 so that the eight numbers surrounding a(1) = 1 would sum to 1. But both 0 and -1 have already appeared thus a(10) cannot be 5 or 6.
a(11) = 11. Given a(9) = -5 and a(10) = -6, the seven terms around a(1) = 1 currently sum to 2 - 1 + 0 + 4 - 4 - 5 - 6 = -10, thus a(11) = 11 so that 11 - 10 = 1.
a(14) = -20. The earliest available numbers, 5 and 6, were able to be chosen for the start of this row, so the current sum of numbers around a(2) = -1 is 6 + 5 + 2 + 11 + 0 + 1 - 6 = 19. Therefore a(14) = -20 so that -20 + 19 = -1.
		

Crossrefs

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

A358337 Earliest infinite sequence of distinct integers on a square spiral such that every number equals the sum of its four adjacent neighbors. See the Comments.

Original entry on oeis.org

0, 1, -1, 2, -2, 3, -3, -6, 6, 4, -4, 9, -5, -13, 5, -17, 11, 10, 8, -20, -11, 20, -9, 7, -15, -10, 17, -18, 19, -22, -8, 21, -12, 33, -31, -21, -19, 39, -7, 15, -14, 14, 12, -25, 43, -30, 25, -16, 22, 13, -34, 41, -50, 50, -28, 26, -24, -33, 46, -53, 71, -26, 18, 23, -27, -60, 54, -71, 28, -23
Offset: 0

Views

Author

Scott R. Shannon, Nov 10 2022

Keywords

Comments

We define earliest as the number with the smallest magnitude, and where a positive number is considered earlier than its negative value.
To ensure the sequence is infinite, other than tracking the numbers that have already appeared in the spiral, one must also calculate the numbers around the outside of the spiral whose values have been fixed by their nearest neighbor on the spiral already having three neighbors with set values. These numbers may have similar neighbors which will force the calculation of other values in a cascade of new fixed numbers that appear as a square diamond shape around the currently filled spiral. When the lowest available number is to be chosen one must ensure it does not equal any of these predetermined values. One additional check must be performed to ensure the sequence is infinite; see the examples below. Unlike A358151 here the numbers along the rows/columns are smaller towards the ends of the rows/columns and larger in the middle. See the linked images.
The values that are positive and negative make a pattern around the spiral axes; see the second linked image. There is no occurrence in the first 500000 terms where a positive number is surrounded by eight negative numbers, or vice versa. It is unknown is this can occur.
The sequence is conjectured to be a permutation of the integers. The values grow rapidly in size, e.g., in the first 1000 terms the largest magnitude number is a(976) = -2492394, while the largest magnitude number in the first 500000 terms is a(499495) = -749...021, a number containing 147 digits.

Examples

			The square spiral begins:
.                            .
                             .
   11...-17...5..-13...-5   -22
    |                   |    |
   10   -2....2...-1    9    19
    |    |         |    |    |
    8    3    0....1   -4   -18
    |    |              |    |
  -20   -3...-6....6....4    17
    |                        |
  -11...20...-9....7...-15..-10
.
.
See the attached text file for a larger 31 by 31 example.
a(0) = 0. The earliest available integer.
a(1)..a(6) = 1,-1,2,-2,3,-3. These are the earliest available six numbers.
a(7) = -6. This number is fixed by previous numbers as a(0) must equal a(1) + a(3) + a(5) + a(7), therefore a(7) = 0 - 1 - 2 - 3 = -6.
a(8) = 6. The earliest available numbers when a(8) is filled are 4,-4,5,-5 but none of those can be chosen else the sequence would not be infinite. Choosing a(8) = 4 would force a(10), the number next to a(1) = 1, to equal 1 - (-1) - 0 - 4 = = -2, but -2 has already appeared. Choosing a(8) = -4 would force the number below a(7) = -6 to equal -6 - (-3) - 0 - (-4) = 1, but 1 has already appeared. Choosing a(8) = 5 would force a(10) to equal -3 which has already appeared. Note however that 5 has already been excluded as the number above a(3) = 2 must equal 2 - (-2) - (-1) - 0 = 5. Finally, choosing a(8) = -5 would force the number below a(7) to equal 2 which has already appeared. This leave 6 as the earliest available number.
a(9) = 4 as this is the earliest available number and it is not excluded by earlier numbers or by the four forced numbers already calculated around the four existing spiral edges.
a(21) = -11. Another check must be performed when choosing the earliest available number which is first seen when finding a(21). As that number is chosen the spiral is:
.
       (15)    8     3
   A   (X)   -20    -3
        B      *   (20)
               C
.
where '*' marks the position of a(21) at the lowest-left corner of the spiral, numbers surrounded by brackets are not yet in the sequence but have been fixed by earlier numbers, and 'A','B','C' are not yet fixed. When a(21) is being chosen the earliest available number is -10. If -10 is chosen for '*' then 'X' would be forced to equal -15. But note that 'X' minus 15, the number above it, equals -30, while '*' minus the number next to it is -10 - 20 = -30. But when now calculating the number 'A' we have A = -15 - 15 - (-20) - B, while when calculating 'C' we have C = -10 - 20 - (-20) - B. Note the last two terms are shared, and as -15 - 15 = -10 - 20 that would imply A = C. This is not allowed, so a(21) cannot be -10. The general rule is if the difference between the number being chosen and its orthogonal neighbor is the same as the difference between the number diagonally adjacent to it with that number's orthogonal neighbor then the chosen number must be rejected. As -10 is not possible and 11 has already appeared a(21) = -11.
		

Crossrefs

Cf. A358151 (eight neighbors), A358254, A354441, A354435, A358048, A344659.

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

A363247 a(0) = 0. a(n) = the smallest nonnegative integer, excluding a(n-1), not occurring in all occurrences of a(n-1)'s eight neighbors thus far in a square spiral.

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 5, 2, 4, 5, 3, 6, 0, 7, 1, 8, 0, 9, 2, 8, 6, 4, 7, 8, 10, 0, 11, 1, 10, 2, 11, 4, 12, 2, 13, 3, 9, 5, 12, 3, 14, 0, 15, 1, 14, 5, 13, 4, 15, 2, 16, 1, 17, 0, 18, 1, 19, 0, 20, 1, 21, 0, 22, 1, 23, 0, 24, 1, 25, 0, 26, 1, 27, 0, 28, 2, 17, 3
Offset: 0

Views

Author

Gavin Lupo, May 24 2023

Keywords

Examples

			The spiral begins:
  0---8---1---7---0
  |               |
  9   4---3---2   6
  |   |       |   |
  2   1   0---1   3   .
  |   |           |   .
  8   5---2---4---5   .
  |                   |
  6---4---7---8---10--0
a(0) = 0
a(1) = 1. Smallest integer that's not a neighbor to every 0 = 1.
a(2) = 2. Smallest integer that's not a neighbor to every 1 = 2.
a(3) = 3. Smallest integer that's not a neighbor to every 2 = 3.
a(4) = 4. Smallest integer that's not a neighbor to every 3 = 4.
a(5) = 1. Smallest integer that's not a neighbor to every 4 = 1.
		

Crossrefs

Showing 1-6 of 6 results.