The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A365017 a(n) is the least nonnegative integer not already in the sequence whose binary expansion is not the concatenation of any two earlier terms. 2
0, 1, 3, 4, 5, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 38, 39, 46, 47, 60, 61, 64, 65, 66, 68, 69, 70, 72, 73, 74, 80, 81, 82, 84, 85, 86, 88, 89, 90, 96, 97, 98, 100, 101, 104, 105, 106, 108, 109, 115, 119, 126, 127, 134, 135, 142, 143, 151, 156, 157, 158, 166, 167, 174 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(1)=0 is taken to be a single 0 bit when concatenating.
LINKS
EXAMPLE
The number 2 is excluded because its binary expansion is "10", which is the concatenation of a(1)="1" and a(0)="0".
The number 19 is excluded because its binary expansion is "10011", which is the concatenation of a(4)="100" and a(3)="11".
MATHEMATICA
conc[x_, y_] := FromDigits[Flatten@IntegerDigits[{x, y}, 2], 2]; a[1] = 0; a[n_] := a[n] = Module[{k = a[n - 1] + 1, v = Array[a, n - 1], c}, c = conc @@@ Select[Tuples[v, {2}], UnsameQ @@ # &]; While[! FreeQ[c, k], k++]; k]; Array[a, 60] (* Amiram Eldar, Sep 29 2023 *)
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
an, bins, concats = 0, {"0"}, set()
while True:
yield an
while (bn:=bin(an:=an+1)[2:]) in concats: pass
concats |= {bn+bi for bi in bins} | {bi+bn for bi in bins}
bins.add(bn)
print(list(islice(agen(), 62))) # Michael S. Branicky, Sep 29 2023
CROSSREFS
Sequence in context: A352908 A211518 A049895 * A226117 A221173 A346599
KEYWORD
nonn,base
AUTHOR
Attila Kiss, Aug 16 2023
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 May 31 22:12 EDT 2024. Contains 373007 sequences. (Running on oeis4.)