OFFSET
0,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
Richard V. Andree, Experiments with Natural Numbers, in: LeRoy C. Dalton and Henry D. Snyder (eds.), Topics for Mathematics Clubs, National Council of Teachers of Mathematics, 1973, Excursion 4, p. 64.
EXAMPLE
a(3) = 8 since 3 occurs in 8! = 40320, but not in 0!, 1!, 2!, ..., 7!.
MATHEMATICA
a[n_] := (k = 0; While[! MatchQ[IntegerDigits[k!], {___, Sequence @@ IntegerDigits[n], ___}], k++]; k); Table[a[n], {n, 0, 70}]
PROG
(PARI) a(n) = my(k=0, s=Str(n)); while (#strsplit(Str(k!), s) < 2, k++); k; \\ Michel Marcus, Jul 05 2021
(Python)
def A346120(n):
s, k, f = str(n), 0, 1
while s not in str(f):
k += 1
f *= k
return k # Chai Wah Wu, Jul 05 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Jul 05 2021
STATUS
approved