OFFSET
1,1
EXAMPLE
a(2)=17 since 17th factorial, i.e., 17!=355687428096000 contains exactly two 5's.
MATHEMATICA
Do[k = 1; While[ Count[IntegerDigits[k! ], 5] != n, k++ ]; Print[k], {n, 1, 60}]
With[{fs=Table[{n, n!}, {n, 500}]}, Table[SelectFirst[fs, DigitCount[#[[2]], 10, 5] == k&], {k, 100}]][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 16 2018 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Jul 30 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jul 31 2002
STATUS
approved