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!)
A334992 a(n) is the smallest number larger than a(n-1) whose a(i)-th binary digit is 0 for all i<n, with a(1)=1. 2

%I #52 Jun 08 2020 09:05:47

%S 1,4,5,8,9,12,13,64,65,68,69,72,73,76,77,128,129,132,133,136,137,140,

%T 141,192,193,196,197,200,201,204,205,1024,1025,1028,1029,1032,1033,

%U 1036,1037,1088,1089,1092,1093,1096,1097,1100,1101,1152

%N a(n) is the smallest number larger than a(n-1) whose a(i)-th binary digit is 0 for all i<n, with a(1)=1.

%C If n=Sum_{i=0..t} 2^(k_i) is the binary representation of n, then a(n)=Sum_{i=0..t} 2^(A335033(k_i)) is the binary representation of a(n).

%C The first 2^n-1 terms are the nonzero partial sums of 2^(A335033(1)), 2^(A335033(2)), ..., 2^(A335033(n)).

%C 2^n is in the sequence if and only if n isn't in the sequence. More specifically, 2^a(n) is not in the sequence, while 2^(A335033(n))=a(2^n).

%C Let F(n) be the number of terms in the sequence among 0,1,2,..,n-1. Then F(2^n)=2^(n-F(n)).

%C F(n)/n seems to be (1/n)^(1/log(n))^(1/loglog(n))^(1/logloglog(n))^... asymptotically (all logs are base 2).

%H Alon Heller, <a href="/A334992/b334992.txt">Table of n, a(n) for n = 1..65536</a>

%F a(Sum_{i=0..t} 2^(k_i)) = Sum_{i=0..t} 2^(A335033(k_i)) (when k_i are distinct nonnegative integers)

%e a(2)=4 because 4 is the smallest number > 1 whose 1st binary digit is 0.

%e a(6)=12 because 12 is the smallest number > 9 whose 1st, 4th, 5th, 8th, and 9th binary digits are all 0.

%o (Python)

%o def gen():

%o """ Generates the terms of A334992, starting with 1 """

%o A334992 = [0]

%o A335033 = [0]

%o while True:

%o new_power = 2**A335033[-1]

%o for i in range(len(A334992)):

%o A334992.append(A334992[i] + new_power)

%o yield A334992[i] + new_power

%o next_compl_elem = A335033[-1] + 1

%o while next_compl_elem in A334992:

%o next_compl_elem += 1

%o A335033.append(next_compl_elem)

%o def A334992_list(n):

%o """ Returns the n first elements as a list """

%o g = gen()

%o return [next(g) for _ in range(n)]

%Y Complement of A335033.

%K nonn,base,easy

%O 1,2

%A _Alon Heller_, May 20 2020

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 September 4 08:22 EDT 2024. Contains 375679 sequences. (Running on oeis4.)