The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A346120 a(n) is the smallest nonnegative number k such that the decimal expansion of k! contains the string n. 2
5, 0, 2, 8, 4, 7, 3, 6, 9, 11, 19, 22, 5, 15, 26, 25, 11, 14, 27, 29, 5, 19, 13, 18, 4, 23, 26, 13, 9, 14, 15, 32, 8, 24, 28, 17, 9, 18, 23, 11, 7, 27, 17, 15, 21, 19, 26, 12, 24, 23, 7, 19, 23, 32, 29, 17, 17, 18, 23, 25, 12, 26, 9, 26, 18, 30, 20, 15, 11, 27, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
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
Sequence in context: A198883 A261850 A077496 * A190913 A019106 A051566
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Jul 05 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 12:24 EDT 2024. Contains 372540 sequences. (Running on oeis4.)