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-2 of 2 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

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.
Showing 1-2 of 2 results.