login
A396607
Lexicographically earliest sequence of distinct nonegative integers whose binary values, when written on a square spiral, one bit per square, high order bits first, contain no pair of 1 bits that are diagonally adjacent.
6
0, 1, 2, 3, 64, 128, 4, 6, 5, 8, 9, 7, 256, 80, 10, 1024, 11, 12, 16, 17, 32, 20, 13, 14, 512, 18, 272, 34, 21, 2048, 15, 36, 22, 40, 19, 42, 320, 23, 24, 1280, 144, 130, 258, 136, 25, 640, 65, 26, 48, 66, 38, 33, 28, 138, 1026, 35, 41, 160, 132, 72, 514, 192, 74
OFFSET
0,3
COMMENTS
After a(0) = 0 when determining the next term in the sequence one must not only ensure that it contains no 1 bits that are diagonally adjacent to any previous 1 bit, including the earlier 1 bits in the term itself, but also that the next square after the end of the term is not diagonally adjacent to any previous 1 bit as the next term must begin with a 1 bit.
It is conjectured that the sequence contains all nonnegative integers.
LINKS
Scott R. Shannon, Image of the first 1000 terms on the square spiral. The 1 bits are black while the 0 bits are light gray. The bits that comprise each term are connected by a red line.
EXAMPLE
The spiral begins:
.
.
0---0---1---0---0---0---1 0
| | |
1 0---0---0---1---0 1 0
| | | | |
1 0 1---0---1 0 0 0
| | | | | | |
1 0 1 0---1 0 1 1
| | | | | |
1 0 1---0---0---0 0 0
| | | |
1 0---1---0---0---1---1 1
| |
0---0---0---0---0---0---0---0
.
a(0) = 0 by definition.
a(1) = 1 as there are no 1 other bits on the spiral, and the 3rd square, the next square after the end of a(1) = 1, can contain a 1 bit as it is only diagonally adjacent to a(0) = 0.
a(4) = 64. This term must be 4 or more but it cannot end on the 9th, 10th, 11th, or 12th square as the following square cannot be 1 due to the 2nd and 3rd square containing 1 bits. The first term that is 4 or more and ends on the 13th square, allowing the 14th square to contain a 1 bit, is 64.
CROSSREFS
Cf. A396608 (start at 1), A007088, A396603, A396604, A394166.
Sequence in context: A280582 A037426 A004854 * A356797 A356785 A015169
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, May 31 2026
STATUS
approved