Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Jul 04 2021 07:50:16
%S 7,4,10,8,8,8,18,16,16,16,16,16,16,16,34,32,32,32,32,32,32,32,32,32,
%T 32,32,32,32,32,32,66,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
%U 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,130,128,128,128,128,128,128
%N 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.
%F 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.
%o (Python)
%o def a(n):
%o if n == 2: return 7
%o digs = n.bit_length()
%o return int(2**digs) if n != 2**(digs - 1) else int(2**digs + 2)
%o print([a(n) for n in range(2, 71)]) # _Michael S. Branicky_, Jul 04 2021
%K base,easy,nonn
%O 2,1
%A _Leroy Quet_, Sep 17 2009
%E Extended by _Ray Chandler_, Mar 13 2010