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!)
A165415 a(n) = the smallest positive integer that contains more digits written in binary than n has written in binary, and which does not contain binary n as a substring in its binary representation. 0
7, 4, 10, 8, 8, 8, 18, 16, 16, 16, 16, 16, 16, 16, 34, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 66, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 130, 128, 128, 128, 128, 128, 128 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
FORMULA
a(2) = 7. For n >=2: a(2^n) = 2^(n+1) + 2; for m such that 2^(n-1)+1 <= m <= 2^n-1, a(m) = 2^n.
PROG
(Python)
def a(n):
if n == 2: return 7
digs = n.bit_length()
return int(2**digs) if n != 2**(digs - 1) else int(2**digs + 2)
print([a(n) for n in range(2, 71)]) # Michael S. Branicky, Jul 04 2021
CROSSREFS
Sequence in context: A195452 A103227 A335166 * A069199 A359014 A138339
KEYWORD
base,easy,nonn
AUTHOR
Leroy Quet, Sep 17 2009
EXTENSIONS
Extended by Ray Chandler, Mar 13 2010
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 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)