login

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

A063576
Smallest k such that 4^k has exactly n 1's in its decimal representation.
2
1, 2, 12, 17, 29, 40, 35, 57, 112, 61, 108, 109, 101, 84, 167, 188, 182, 186, 205, 259, 252, 240, 269, 320, 329, 283, 305, 317, 300, 400, 288, 413, 458, 360, 392, 466, 447, 477, 383, 493, 481, 574, 598, 497, 567, 551, 599, 603, 676, 721, 564
OFFSET
0,2
LINKS
MAPLE
N:= 100: # for a(0)..a(N)
A:= Array(0..N):
count:= 0:
for k from 1 while count < N+1 do
v:= numboccur(1, convert(4^k, base, 10));
if v <= N and A[v] = 0 then A[v]:= k; count:= count+1; fi
od:
convert(A, list); # Robert Israel, Jul 03 2020
MATHEMATICA
a = {}; Do[k = 1; While[ Count[ IntegerDigits[4^k], 1] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
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 *)
CROSSREFS
Cf. A000302 (powers of 4).
Sequence in context: A057827 A266802 A082407 * A144264 A277961 A294998
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
Name corrected by Jon E. Schoenfield, Jun 26 2018
STATUS
approved