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
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Image of the first 50000 terms.
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
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Feb 08 2024
STATUS
approved