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!)
A108737 Start with S = {}. For m = 0, 1, 2, 3, ... let u be the binary expansion of m. If u is not a substring of S, append the minimal number of 0's and 1's to S to remedy this. Sequence gives S. 6
0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
We construct S as follows, starting with S = {}.
0 is missing, so S = {0};
1 is missing, so S = {0,1};
10 is missing, so S = {0,1,0};
11 is missing, so S = {0,1,0,1,1};
100 is missing, so S = {0,1,0,1,1,0,0};
101 and 110 are visible, but 111 is missing, so S = {0,1,0,1,1,0,0,1,1,1}; etc.
PROG
(Python)
from itertools import count, islice, product
def a(): # generator of terms
S = ""
for m in count(0):
Sm = bin(m)[2:]
if Sm in S: continue
for i in range(1, len(Sm)+1):
v = Sm[-i:]
t = "" if len(v) == len(Sm) else S[-len(Sm)+i:]
if t+v == Sm: break
S += v
yield from list(map(int, v))
print(list(islice(a(), 105))) # Michael S. Branicky, Oct 27 2023
CROSSREFS
Cf. A108736.
Sequence in context: A189203 A296028 A165263 * A165221 A295891 A093879
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 23 2005
EXTENSIONS
More terms from John W. Layman, Jun 24 2005
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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)