login
A063565
Smallest positive number k such that 2^k contains n.
11
10, 4, 1, 5, 2, 8, 4, 15, 3, 12, 10, 40, 7, 17, 18, 21, 4, 27, 30, 13, 11, 18, 43, 41, 10, 8, 18, 15, 7, 32, 22, 17, 5, 25, 27, 25, 16, 30, 14, 42, 12, 22, 19, 22, 18, 28, 42, 31, 11, 32, 52, 9, 19, 16, 25, 16, 8, 20, 33, 33, 23, 58, 18, 14, 6, 16, 46, 24, 15, 34, 29, 21, 17, 30
OFFSET
0,1
LINKS
Popular Computing (Calabasas, CA), Two Tables, Vol. 1, (No. 9, Dec 1973), page PC9-16.
EXAMPLE
a(7) = 15 because 2^15 = 32768.
MATHEMATICA
a = {}; Do[k = 1; While[ StringPosition[ ToString[2^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
PROG
(Python)
def A063565(n):
....s, k, k2 = str(n), 1, 2
....while True:
........if s in str(k2):
............return k
........k += 1
........k2 *= 2 # Chai Wah Wu, Jun 20 2015
CROSSREFS
Apart from initial term, a duplicate of A030000.
Sequence in context: A089478 A028967 A097530 * A371918 A177390 A082961
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
More terms from Hans Havermann
STATUS
approved