OFFSET
0,3
COMMENTS
The main concentration of terms lie along the line a(n) = n, so numerous fixed points exists - there are 301 fixed points in the first 300000 terms. The sequence is conjectured to be a permutation of the positive integers.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 0..10000
Michael De Vlieger, Scalar plot of a(n), n = 0..2^16, highlighting records in red, local minima in blue, a(n) = 2^e in green, labeling the indices of certain records and local minima.
Michael De Vlieger, Bitmap of a(n), n = 0..2^11, 12X vertical exaggeration, read horizontally where black represents 1 and white 0, with least significant bit on bottom.
Michael De Vlieger, Bitmap of (a(n-1) + a(n)), n = 1..2^11, 12X vertical exaggeration, read horizontally where black represents 1 and white 0, with least significant bit on bottom.
Scott R. Shannon, Image for n=0..20000.
Scott R. Shannon, Image for n=0..75000.
Scott R. Shannon, Image for n=0..300000.
Scott R. Shannon, Image for n=0..2250000.
EXAMPLE
a(6) = 10 as the concatenation of a(0)..a(5) in binary is "011011100101" and a(5) + 10 = 5 + 10 = 15 = 1111_2 which does not appear in the concatenated string. Since 11 = 1011_2, 12 = 1100_2, 13 = 1101_2, 14 = 1110_2 all appear in the concatenated string, a(6) cannot be 6, 7, 8 or 9.
MATHEMATICA
nn = 77; c[_] = False; j = a[0] = 0; u = 1; w = "0"; Do[k = u; While[Or[c[k], StringContainsQ[w, Set[v, IntegerString[j + k, 2]]]], k++]; Set[{a[n], c[k]}, {k, True}]; Set[{j, w}, {k, w <> IntegerString[k, 2]}]; If[k == u, While[c[u], u++]], {n, nn}]; Array[a, nn + 1, 0] (* Michael De Vlieger, Sep 13 2022 *)
PROG
(Python)
from itertools import islice
def agen():
aset, astr, an, mink = {0}, "0", 0, 1
while True:
yield an; k = mink
while k in aset or bin(an+k)[2:] in astr: k += 1
while mink in aset: mink += 1
an = k; aset.add(an); astr += bin(an)[2:]
print(list(islice(agen(), 77))) # Michael S. Branicky, Sep 16 2022
CROSSREFS
KEYWORD
AUTHOR
Scott R. Shannon, Sep 11 2022
EXTENSIONS
Images for n=0..300000 and n=0..2250000 corrected by Scott R. Shannon, Oct 05 2022
STATUS
approved