login
A379289
Spiral sequence of squares starting with 1 in the center. Each new term is the sum of its eight neighbors, negated if the number of nonempty neighbors is even. Spiral moves up first, then right, down, left, repeating outward.
0
1, 1, -2, 0, -1, 0, -1, -1, 1, -2, 2, 1, 1, 0, 3, 2, -1, 0, 2, 1, 0, 1, 0, 2, 1, 1, -2, 1, -5, -3, 2, 0, -4, -1, -3, -2, 3, 0, -1, -2, -1, 0, 0, -1, 0, -3, 0, -4, -2, 1, 2, -2, 8, -1, 7, 6, -8, 0, 2, 3, 5, 1, 1, 2, -5, 0, -2, 5, -1, 4, -3, -3, 3, 1, 0, 4, -1
OFFSET
1,3
COMMENTS
Even when n gets large, some a(n)=0. I cannot prove this will continue forever.
EXAMPLE
The sequence starts with 1 in the center. The next value is directly above the center and has only one neighbor (the center a(1)=1), so with one neighbor the sum is positive: a(2)=1. The third value is to the right of a(2) and has two neighbors (a(1)=1 and a(2)=1), resulting in a sum of 2, but since it has an even number of neighbors, it is made negative: a(3)=-2. The fourth value goes down and has three neighbors (a(1)=1, a(2)=1, and a(3)=-2) which sum to 0: a(4)=0. The fifth value still goes down and has two neighbors (a(1)=1 and a(4)=0) summing to 1, but with two neighbors it is made negative: a(5)=-1.
The positions of the first 9 terms are:
9 2 3
8 1 4
7 6 5
CROSSREFS
Sequence in context: A015879 A230000 A016242 * A216659 A321396 A141747
KEYWORD
sign
AUTHOR
Alexander Shahan, Dec 20 2024
STATUS
approved