Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 Jun 26 2018 19:12:32
%S 1,4,13,23,20,46,52,35,37,68,80,103,106,91,115,138,123,148,152,137,
%T 166,170,156,199,182,188,222,225,237,200,294,292,247,288,272,289,278,
%U 314,327,328,402,363,269,312,374,413,372,407,399,444,411
%N Smallest k such that 9^k has exactly n 5's in its decimal representation.
%t a = {}; Do[k = 1; While[ Count[ IntegerDigits[9^k], 5] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
%t With[{p9=Table[{n,9^n},{n,450}]},Transpose[Table[SelectFirst[p9, DigitCount[ #[[2]],10,5]==i&],{i,0,50}]][[1]]] (* _Harvey P. Dale_, Nov 12 2015 *)
%K base,nonn
%O 0,2
%A _Robert G. Wilson v_, Aug 10 2001
%E Name corrected by _Jon E. Schoenfield_, Jun 26 2018