login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A352715 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 floor(k/2) common 1-bits in their binary representations, where k is the number of bits in the binary representation of a(n-1). 2
1, 2, 3, 5, 4, 6, 10, 11, 7, 9, 13, 12, 14, 22, 15, 19, 17, 21, 20, 23, 18, 26, 24, 25, 28, 27, 35, 39, 31, 37, 45, 29, 41, 43, 42, 46, 30, 38, 47, 44, 60, 52, 53, 49, 51, 50, 54, 58, 55, 57, 56, 59, 75, 63, 71, 67, 79, 61, 77, 69, 85, 81, 83, 82, 86, 62, 78, 70 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A variant of A109812. Sharing floor(k/2) common 1-bits is akin to minimal or zero correlation between sequences whose elements are in {+1,-1}.
LINKS
Rémy Sigrist, PARI program
PROG
(PARI) See Links section.
(Python 3.10+)
from itertools import islice
def A352715_gen(): # generator of terms
yield 1
l1, s, b, bli = 1, 2, set(), 0
while True:
i = s
while True:
if not (i in b or (i & l1).bit_count() != bli):
yield i
l1 = i
bli = l1.bit_length()//2
b.add(i)
while s in b:
b.remove(s)
s += 1
break
i += 1
A352715_list = list(islice(A352715_gen(), 20)) # Chai Wah Wu, Apr 02 2022
CROSSREFS
Cf. A109812.
Sequence in context: A365390 A359557 A114744 * A096114 A344169 A121664
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 04:06 EDT 2024. Contains 375959 sequences. (Running on oeis4.)