|
|
A352716
|
|
a(1)=1; thereafter a(n) = smallest positive integer not among the earlier terms of the sequence such that a(n) and a(n-1) have an even number of common 1-bits in their binary representations
|
|
1
|
|
|
1, 2, 4, 3, 7, 5, 8, 6, 9, 11, 10, 14, 12, 13, 16, 15, 19, 17, 21, 20, 22, 18, 23, 25, 24, 26, 28, 27, 31, 29, 32, 30, 33, 35, 34, 38, 36, 37, 41, 39, 42, 40, 43, 44, 52, 45, 47, 46, 50, 48, 49, 54, 55, 51, 56, 53, 58, 59, 57, 61, 60, 62, 64, 63, 67, 65, 69, 68, 70, 66, 71, 73, 72, 74, 76, 75, 79, 77, 81, 80, 82, 78, 83, 84, 88, 85, 87, 86, 89, 91, 90, 94, 92
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A variant of A109812. Sharing an even number of common 1-bits is equivalent to zero correlation between sequences in the vector space F_2^k.
|
|
LINKS
|
|
|
PROG
|
(PARI) See Links section.
(Python 3.10+)
from itertools import islice
def A352716_gen(): # generator of terms
yield 1
l1, s, b = 1, 2, set()
while True:
i = s
while True:
if not (i in b or (i & l1).bit_count() % 2):
yield i
l1 = i
b.add(i)
while s in b:
b.remove(s)
s += 1
break
i += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|