login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest k >= 0 such that 7^k has exactly n 0's in its decimal representation.
9

%I #11 Apr 12 2022 09:22:58

%S 0,4,9,13,25,55,39,41,45,70,69,65,75,107,109,134,167,142,156,196,157,

%T 205,214,180,213,183,162,251,263,276,268,290,306,295,369,313,332,293,

%U 353,340,357,387,367,476,334,509,363,474,454,488,453

%N Smallest k >= 0 such that 7^k has exactly n 0's in its decimal representation.

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

%t Module[{p7=DigitCount[#,10,0]&/@(7^Range[600]),nn=60},Join[{0},Flatten[ Table[ Position[p7,n,1,1],{n,nn}]]]] (* _Harvey P. Dale_, Apr 12 2022 *)

%o (PARI) A063606(n)=for(k=n, oo, #select(d->!d, digits(5^k))==n&&return(k)) \\ _M. F. Hasler_, Jun 14 2018

%Y Cf. A031146 (analog for 2^k), A063555 (analog for 3^k), A063575 (analog for 4^k), A063585 (for 5^k), A063596 (analog for 6^k).

%K base,nonn

%O 0,2

%A _Robert G. Wilson v_, Aug 10 2001