This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A346120 #18 Feb 22 2024 02:16:12 %S A346120 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, %T A346120 13,9,14,15,32,8,24,28,17,9,18,23,11,7,27,17,15,21,19,26,12,24,23,7, %U A346120 19,23,32,29,17,17,18,23,25,12,26,9,26,18,30,20,15,11,27,13 %N A346120 a(n) is the smallest nonnegative number k such that the decimal expansion of k! contains the string n. %H A346120 Amiram Eldar, <a href="/A346120/b346120.txt">Table of n, a(n) for n = 0..10000</a> %H A346120 Richard V. Andree, Experiments with Natural Numbers, in: LeRoy C. Dalton and Henry D. Snyder (eds.), <a href="https://eric.ed.gov/?id=ED079163">Topics for Mathematics Clubs</a>, National Council of Teachers of Mathematics, 1973, Excursion 4, p. 64. %e A346120 a(3) = 8 since 3 occurs in 8! = 40320, but not in 0!, 1!, 2!, ..., 7!. %t A346120 a[n_] := (k = 0; While[! MatchQ[IntegerDigits[k!], {___, Sequence @@ IntegerDigits[n], ___}], k++]; k); Table[a[n], {n, 0, 70}] %o A346120 (PARI) a(n) = my(k=0, s=Str(n)); while (#strsplit(Str(k!), s) < 2, k++); k; \\ _Michel Marcus_, Jul 05 2021 %o A346120 (Python) %o A346120 def A346120(n): %o A346120 s, k, f = str(n), 0, 1 %o A346120 while s not in str(f): %o A346120 k += 1 %o A346120 f *= k %o A346120 return k # _Chai Wah Wu_, Jul 05 2021 %Y A346120 Cf. A000142, A030000, A038690, A082058. %K A346120 nonn,base %O A346120 0,1 %A A346120 _Ilya Gutkovskiy_, Jul 05 2021