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!)
A203718 Binary sequence where each successive term is made by appending to the previous term the next smallest positive binary integer that is not already contained within it. 1

%I #32 May 21 2021 08:08:20

%S 1,110,110100,110100111,1101001111000,11010011110001011,

%T 1101001111000101110000,110100111100010111000010010,

%U 11010011110001011100001001010101,1101001111000101110000100101010110110,110100111100010111000010010101011011011001

%N Binary sequence where each successive term is made by appending to the previous term the next smallest positive binary integer that is not already contained within it.

%C Each successive term is built from the last by appending to it the next smallest positive binary integer that is not already contained within the previous term as a sequential subset. E.g., a(2) = 110. The smallest positive binary integer not contained within this term is 100, since 1, 10 and 11 can all be found in parts of it. Therefore a(3) is the concatenation of a(2) and '100'; a(3) = 110100.

%C Note that every power of 2 will always be included, as there is never a prior instance of exactly that many zeros occurring sequentially. This sequence can be generalized to other number bases, but higher bases take more terms to begin exhibiting interesting (nontrivial) behavior. Can also be begun with a 'seed' number. Properties of this sequence using seed values are yet to be examined. Open questions: frequency at which new integers are appended, frequency of each digit within successive terms, rate of growth of terms.

%o (Python)

%o def A203718(n, seed = '1'):

%o """

%o Returns the n-th term of the sequence.

%o Optionally specified seed.

%o """

%o i = 0

%o term = seed

%o next_int = 1

%o while i < n:

%o b = bin(next_int)[2:]

%o if b not in term:

%o term += b

%o i += 1

%o next_int += 1

%o return term

%o def A203718_list(stop, start = 0, seed = '1'):

%o """

%o Returns a slice of the sequence up to the specified index.

%o Seed and starting index optional

%o """

%o terms = [seed]

%o term = seed

%o i = 0

%o next_int = 1

%o while i < stop:

%o b = bin(next_int)[2:]

%o if b not in term:

%o term += b

%o if start <= i:

%o terms.append(term)

%o i += 1

%o next_int += 1

%o return terms

%K nonn,base

%O 1,2

%A _Michael Cromer_, Jan 05 2012

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 March 29 09:44 EDT 2024. Contains 371268 sequences. (Running on oeis4.)