login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063429 Smallest k such that 2^k has exactly n 3's in its decimal representation. 9

%I #15 Jul 30 2023 13:41:35

%S 1,5,49,25,35,109,96,128,135,169,182,156,208,302,310,277,221,300,346,

%T 498,387,502,563,507,503,611,550,585,615,681,731,817,819,835,779,860,

%U 849,840,879,997,1016,925,1066,1161,1117,1186,1282,1090,1293,1251,1444

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

%H Harry J. Smith, <a href="/A063429/b063429.txt">Table of n, a(n) for n = 0..150</a>

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

%t With[{dr=Table[{k,DigitCount[2^k,10,3]},{k,1500}]},Table[SelectFirst[dr,#[[2]]==n&],{n,0,50}]][[;;,1]] (* _Harvey P. Dale_, Jul 30 2023 *)

%o (PARI) a(n)={my(k=1); while(n<>#select(d->d==3, digits(2^k)), k++); k} \\ _Harry J. Smith_, Aug 20 2009, _Andrew Howroyd_, Jun 26 2018

%Y Cf. A063115, A063426, A063430, A063526, A063540, A063552, 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:53 EDT 2024. Contains 371969 sequences. (Running on oeis4.)