OFFSET
1,2
COMMENTS
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).
The first 2^n-1 terms are the nonzero partial sums of 2^(A335033(1)), 2^(A335033(2)), ..., 2^(A335033(n)).
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).
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)).
F(n)/n seems to be (1/n)^(1/log(n))^(1/loglog(n))^(1/logloglog(n))^... asymptotically (all logs are base 2).
LINKS
Alon Heller, Table of n, a(n) for n = 1..65536
FORMULA
a(Sum_{i=0..t} 2^(k_i)) = Sum_{i=0..t} 2^(A335033(k_i)) (when k_i are distinct nonnegative integers)
EXAMPLE
a(2)=4 because 4 is the smallest number > 1 whose 1st binary digit is 0.
a(6)=12 because 12 is the smallest number > 9 whose 1st, 4th, 5th, 8th, and 9th binary digits are all 0.
PROG
(Python)
def gen():
""" Generates the terms of A334992, starting with 1 """
A334992 = [0]
A335033 = [0]
while True:
new_power = 2**A335033[-1]
for i in range(len(A334992)):
yield A334992[i] + new_power
next_compl_elem = A335033[-1] + 1
while next_compl_elem in A334992:
next_compl_elem += 1
A335033.append(next_compl_elem)
def A334992_list(n):
""" Returns the n first elements as a list """
g = gen()
return [next(g) for _ in range(n)]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Alon Heller, May 20 2020
STATUS
approved