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.
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
Keywords
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.
Links
- Scott R. Shannon, Table of n, a(n) for n = 0..10000
- Scott R. Shannon, Image of log_10 of the absolute value of the first 100000 terms on the spiral. The values are scaled across the spectrum from red to violet to show their relative magnitude.
- Scott R. Shannon, Image showing the sign of the first 100000 terms on the spiral. White is positive, black is negative.
- Scott R. Shannon, Image of log_10 of the positive value of the first 500000 terms.
- Scott R. Shannon, 31 by 31 inner block of the spiral.
- Scott R. Shannon, Explanation of how the sequence terms are selected.
Comments