|
|
A063575
|
|
Smallest k such that 4^k has exactly n 0's in its decimal representation.
|
|
11
|
|
|
0, 5, 21, 35, 47, 44, 50, 51, 103, 99, 121, 125, 126, 175, 166, 131, 185, 153, 184, 223, 272, 232, 248, 336, 233, 306, 315, 384, 314, 327, 333, 373, 393, 399, 454, 457, 504, 453, 484, 506, 621, 494, 510, 639, 522, 557, 560, 559, 716, 609, 629
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
MATHEMATICA
|
a = {}; Do[k = 0; While[ Count[ IntegerDigits[4^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
Module[{nn=750, p4}, p4=Table[{n, DigitCount[4^n, 10, 0]}, {n, nn}]; Transpose[ Table[ SelectFirst[p4, #[[2]]==i&], {i, 0, 50}]][[1]]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 20 2016 *)
|
|
PROG
|
(PARI) Count(x, d)= { local(c, f); c=0; while (x>9, f=x-10*(x\10); if (f==d, c++); x\=10); if (x==d, c++); return(c) } { for (n=0, 150, a=0; while (Count(4^a, 0) != n, a++); write("b063575.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 26 2009
(PARI) A063575(n)=for(k=n, oo, #select(d->!d, digits(4^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|