OFFSET
0,3
COMMENTS
From Michael S. Branicky, Feb 04 2026: (Start)
Index of first occurrence of n in A067109, so considers overlaps. These occur in computing a(5) = 99.
a(18) = 967711. No other terms < 10^6. (End)
EXAMPLE
a(3) = 313 because in 313! 313 appears exactly 3 times.
MATHEMATICA
a = Table[ -1, {12}]; Do[b = Length[ StringPosition[ ToString[n! ], ToString[n]]]; If[a[[b+1]] == -1, a[[b+1]] = n], {n, 0, 15000} ]; a
PROG
(Python)
from gmpy2 import digits, fac, mpz
from itertools import count, islice
def count_overlaps(subs, s):
c = i = 0
while i != -1:
i = s.find(subs, i)
if i != -1: c += 1; i += 1
return c
def f(n): # A067109
return count_overlaps(digits(n), digits(fac(mpz(n))))
def agen(): # generator of terms
adict, n = dict(), 0
for k in count(0):
v = f(k)
if v not in adict:
adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 12))) # Michael S. Branicky, Feb 03 2026
CROSSREFS
KEYWORD
nonn,base,more,less
AUTHOR
Michel ten Voorde, May 22 2001
EXTENSIONS
More terms from Robert G. Wilson v, Jan 09 2002
a(12)-a(16) from Michael S. Branicky, Feb 04 2026
STATUS
approved