OFFSET
1,1
COMMENTS
It is conjectured that a(9) = 0 since no factorial < 10000 contained just 9 fours.
EXAMPLE
a(2) = 19 since 19th factorial, i.e., 19! = 121645100408832000 contains exactly two 4's.
MATHEMATICA
Do[k = 1; While[ Count[IntegerDigits[k! ], 4] != n, k++ ]; Print[k], {n, 1, 60}]
PROG
(Python)
from math import factorial
def a(n, limit=1000):
fact = 1
for t in range(limit+1):
if str(fact).count('4') == n: return t
fact *= (t+1)
return 0
print([a(n) for n in range(1, 57)]) # Michael S. Branicky, Apr 19 2021
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