%I #19 Jun 26 2018 05:03:08
%S 1,15,27,24,46,75,116,152,157,170,181,237,297,282,360,214,317,380,475,
%T 311,417,440,424,538,535,427,474,632,654,651,810,766,832,626,848,824,
%U 780,931,897,992,889,1004,981,1079,1087,1123,1224,1186,892,1174,1200
%N Smallest k such that 2^k has exactly n 7's in its decimal representation.
%H Harry J. Smith, <a href="/A063552/b063552.txt">Table of n, a(n) for n = 0..150</a>
%t a = {}; Do[k = 1; While[ Count[ IntegerDigits[2^k], 7] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
%t Join[{1},With[{c=DigitCount[#,10,7]&/@(2^Range[0,1300])},Flatten[ Table[ Position[c,n,1,1],{n,60}]]]-1] (* _Harvey P. Dale_, Oct 14 2012 *)
%o (PARI) a(n)={my(k=1); while(n<>#select(d->d==7, digits(2^k)), k++); k} \\ _Harry J. Smith_, Aug 26 2009, _Andrew Howroyd_, Jun 26 2018
%Y Cf. A063115, A063426, A063429, A063430, A063526, A063540, A063553, 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
|