OFFSET
1,3
COMMENTS
There are no more terms up to k = 21000, checked using the Python program below.
a(9) > 200000. - Dana Jacobsen, Jan 03 2016
a(9) > 1000000. - Michael S. Branicky, Feb 04 2026
EXAMPLE
1170 belongs to this sequence because the digits 1, 7 and 0 appear 1170 times in total in the decimal representation of 1170!.
0! = 1, which contains no zeros, so 0 is a term.
PROG
(Python)
from math import factorial
def in_a(n):
f = str(factorial(n))
s = set(str(n))
return sum(f.count(d) for d in s)==n
(Python)
from collections import Counter
from gmpy2 import digits, fac, mpz
def ok(k):
c = Counter(digits(fac(mpz(k))))
return sum(c[d] for d in set(digits(k))) == k
print([k for k in range(12000) if ok(k)]) # Michael S. Branicky, Feb 04 2026
(Perl) use ntheory ":all"; sub is_a264688 { my $n = shift; $n == eval "factorial($n) =~ tr/[$n]//"; } # Dana Jacobsen, Jan 03 2016
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Christian Perfect, Jan 03 2016
STATUS
approved
