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!)
A346203 a(n) is the smallest nonnegative number k such that the decimal expansion of the product of the first k primes contains the string n. 1
3, 0, 1, 3, 10, 7, 2, 9, 9, 8, 4, 18, 17, 11, 15, 16, 14, 18, 24, 16, 11, 4, 9, 5, 21, 13, 13, 13, 9, 21, 3, 5, 10, 14, 12, 13, 26, 24, 12, 17, 18, 15, 12, 26, 16, 22, 10, 16, 12, 11, 13, 7, 13, 20, 17, 19, 11, 20, 15, 18, 11, 14, 21, 13, 10, 24, 20, 14, 21, 8, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
EXAMPLE
a(5) = 7 since 5 occurs in prime(7)# = 2 * 3 * 5 * 7 * 11 * 13 * 17 = 510510, but not in prime(0)#, prime(1)#, prime(2)#, ..., prime(6)#.
MATHEMATICA
primorial[n_] := Product[Prime[j], {j, 1, n}]; a[n_] := (k = 0; While[! MatchQ[IntegerDigits[primorial[k]], {___, Sequence @@ IntegerDigits[n], ___}], k++]; k); Table[a[n], {n, 0, 70}]
PROG
(Python)
from sympy import nextprime
def A346203(n):
m, k, p, s = 1, 0, 1, str(n)
while s not in str(m):
k += 1
p = nextprime(p)
m *= p
return k # Chai Wah Wu, Jul 12 2021
(PARI) a(n) = my(k=0, p=1, q=1, sn=Str(n)); while (#strsplit(Str(q), sn)==1, k++; p=nextprime(p+1); q*=p); k; \\ Michel Marcus, Jul 13 2021; corrected Jun 15 2022
CROSSREFS
Sequence in context: A083857 A353077 A115142 * A327126 A273083 A307451
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Jul 10 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 April 25 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)