login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest k such that 2^k has exactly n 8's in its decimal representation.
8

%I #9 Jun 26 2018 05:03:14

%S 1,3,19,47,23,82,91,74,165,201,147,229,213,267,281,265,342,422,416,

%T 350,322,470,454,426,537,642,631,439,593,677,625,554,723,700,745,818,

%U 896,809,995,930,957,980,1031,1045,1121,1210,891,1191,1154,1369,1230

%N Smallest k such that 2^k has exactly n 8's in its decimal representation.

%t a = {}; Do[k = 1; While[ Count[ IntegerDigits[2^k], 8] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a

%o (PARI) a(n)={my(k=1); while(n<>#select(d->d==8, digits(2^k)), k++); k} \\ _Andrew Howroyd_, Jun 26 2018

%Y Cf. A063115, A063426, A063429, A063430, A063526, A063540, A063552, A063554.

%K base,nonn

%O 0,2

%A _Robert G. Wilson v_, Aug 10 2001

%E Name corrected by _Jon E. Schoenfield_, Jun 25 2018