login
Smallest k such that 6^k has exactly n 5's in its decimal representation.
1

%I #13 Jun 26 2018 19:14:58

%S 1,6,20,18,33,48,47,52,70,55,103,92,102,138,121,128,161,123,151,183,

%T 190,193,215,216,199,227,290,277,243,274,268,333,270,298,372,365,341,

%U 332,359,406,465,475,481,442,512,453,468,541,523,563,525

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

%H Harvey P. Dale, <a href="/A063601/b063601.txt">Table of n, a(n) for n = 0..1000</a>

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

%t Join[{1},With[{c6=DigitCount[#,10,5]&/@(6^Range[600])},Flatten[Table[ Position[ c6,n,1,1],{n,51}]]]] (* _Harvey P. Dale_, May 17 2018 *)

%K base,nonn

%O 0,2

%A _Robert G. Wilson v_, Aug 10 2001

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