login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


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

%I

%S 1,2,12,17,29,40,35,57,112,61,108,109,101,84,167,188,182,186,205,259,

%T 252,240,269,320,329,283,305,317,300,400,288,413,458,360,392,466,447,

%U 477,383,493,481,574,598,497,567,551,599,603,676,721,564

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

%H Robert Israel, <a href="/A063576/b063576.txt">Table of n, a(n) for n = 0..2000</a>

%p N:= 100: # for a(0)..a(N)

%p A:= Array(0..N):

%p count:= 0:

%p for k from 1 while count < N+1 do

%p v:= numboccur(1, convert(4^k,base,10));

%p if v <= N and A[v] = 0 then A[v]:= k; count:= count+1; fi

%p od:

%p convert(A,list); # _Robert Israel_, Jul 03 2020

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

%t With[{p4=Table[DigitCount[4^n,10,1],{n,750}]},Table[Position[p4,i,1,1],{i,0,50}]]//Flatten (* _Harvey P. Dale_, May 05 2018 *)

%Y Cf. A000302 (powers of 4).

%K base,nonn

%O 0,2

%A _Robert G. Wilson v_, Aug 10 2001

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

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 10 02:02 EDT 2020. Contains 336365 sequences. (Running on oeis4.)