login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A063426
Smallest k such that 2^k has exactly n 2's in its decimal representation.
9
2, 1, 18, 43, 41, 93, 81, 107, 125, 177, 174, 196, 200, 197, 280, 265, 320, 348, 330, 481, 492, 486, 314, 449, 535, 509, 505, 616, 686, 742, 577, 598, 743, 788, 991, 885, 941, 810, 987, 934, 963, 970, 1165, 1018, 984, 1125, 928, 1279, 1126, 1232, 1164
OFFSET
0,1
LINKS
MATHEMATICA
a = {}; Do[k = 1; While[ Count[ IntegerDigits[2^k], 2] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
PROG
(PARI) a(n)={my(k=1); while(n<>#select(d->d==2, digits(2^k)), k++); k} \\ Harry J. Smith, Aug 23 2009, Andrew Howroyd, Jun 26 2018
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
Name corrected by Jon E. Schoenfield, Jun 25 2018
STATUS
approved