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”).

A063631
Smallest k such that 9^k has exactly n 5's in its decimal representation.
0
1, 4, 13, 23, 20, 46, 52, 35, 37, 68, 80, 103, 106, 91, 115, 138, 123, 148, 152, 137, 166, 170, 156, 199, 182, 188, 222, 225, 237, 200, 294, 292, 247, 288, 272, 289, 278, 314, 327, 328, 402, 363, 269, 312, 374, 413, 372, 407, 399, 444, 411
OFFSET
0,2
MATHEMATICA
a = {}; Do[k = 1; While[ Count[ IntegerDigits[9^k], 5] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
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 *)
CROSSREFS
Sequence in context: A339804 A256390 A264623 * A031240 A031320 A112263
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
Name corrected by Jon E. Schoenfield, Jun 26 2018
STATUS
approved