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!)
A370046 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number whose binary value is a substring of the binary value of the sum of all previous terms. 2
1, 2, 3, 6, 4, 8, 12, 9, 5, 18, 17, 10, 7, 19, 14, 16, 11, 20, 13, 24, 22, 15, 32, 36, 34, 25, 23, 37, 27, 21, 26, 64, 69, 40, 43, 29, 30, 35, 39, 44, 28, 42, 53, 129, 72, 38, 31, 81, 45, 50, 46, 47, 49, 74, 41, 54, 55, 51, 52, 57, 58, 128, 68, 70, 140, 77, 60, 139, 85, 33, 75, 61, 59, 62, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The fixed points begin 1, 2, 3, 16, 39, 42, 50, 79, 120, 361, although it is likely there are infinitely more. The sequence is conjectured to be a permutation of the positive numbers.
LINKS
FORMULA
a(n) = A317788(n) for any n >= 3. - Rémy Sigrist, Feb 09 2024
EXAMPLE
a(7) = 12 as the sum of all previous terms is 1 + 2 + 3 + 6 + 4 + 8 = 24 = 11000_2 and 12 = 1100_2 is the smallest unused number that is a substring of "11000".
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
s, mink, aset = 3, 3, {1, 2}
yield from [1, 2]
while True:
an, ss = mink, bin(s)[2:]
while an in aset or not bin(an)[2:] in ss: an += 1
aset.add(an); s += an; yield an
while mink in aset: mink += 1
print(list(islice(agen(), 75))) # Michael S. Branicky, Feb 08 2024
CROSSREFS
Cf. A317788, A369899 (base 10), A363186, A333410.
Sequence in context: A349702 A289055 A109890 * A373326 A086537 A212486
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Feb 08 2024
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 August 9 22:35 EDT 2024. Contains 375044 sequences. (Running on oeis4.)