|
|
A072178
|
|
a(n)-th factorial is the smallest factorial containing exactly n 4's, or 0 if no such number exists.
|
|
8
|
|
|
4, 19, 21, 24, 44, 42, 50, 57, 0, 60, 76, 91, 56, 86, 85, 66, 92, 88, 114, 129, 131, 106, 130, 122, 117, 157, 134, 175, 119, 150, 181, 165, 185, 179, 198, 182, 220, 228, 188, 190, 261, 235, 222, 231, 229, 233, 224, 227, 288, 372, 241, 279, 254, 253, 318, 267
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
It is conjectured that a(9) = 0 since no factorial < 10000 contained just 9 fours.
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|