login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A300289
a(n) is the smallest prime p such that the product of p and prime(n) contains only prime digits, or -1 if no such prime p exists.
2
11, 11, 5, 5, 2, 29, 19, 3, 11, 13, 17, 61, 13, 59, 5, 61, 43, 37, 5, 5, 101, 3, 31, 307, 59, 23, 541, 5, 3, 29, 179, 17, 1721, 257, 17, 5, 239, 229, 199, 149, 3, 13, 3, 1439, 281, 127, 107, 101, 9791, 163, 31, 107, 3, 3, 139, 199, 83, 13, 929, 83, 19, 11, 11, 107, 71, 181, 167, 661, 1031
OFFSET
1,1
COMMENTS
If a(i) = prime(j), then a(j) <= prime(i). - Rémy Sigrist, Mar 03 2018. [Note that this does not imply that a prime p always exists! In fact if r and s are large primes, r*s will surely contain a nonprime digit, although this kind of question is beyond the reach of present-day mathematics. - N. J. A. Sloane, Mar 03 2018]
LINKS
EXAMPLE
11 is the smallest prime such that 11*prime(1)=22 consists of only prime digits. Therefore a(1) = 11.
MATHEMATICA
p[n_] := Module[{k = 1}, While[Union[PrimeQ /@ IntegerDigits[n*Prime[k]]] != {True}, k++]; Prime[k]]; p /@ Prime[Range[100]]
spp[p_]:=Module[{k=2}, While[AnyTrue[IntegerDigits[p*k], !PrimeQ[#]&], k=NextPrime[k]]; k]; Table[spp[p], {p, Prime[Range[70]]}] (* Harvey P. Dale, Jun 20 2023 *)
PROG
(PARI) a(n) = {forprime(p=2, , if (#select(x->(! isprime(x)), digits(p*prime(n))) == 0, return (p)); ); } \\ Michel Marcus, Mar 02 2018
CROSSREFS
Cf. A046034.
Sequence in context: A061186 A135684 A220295 * A321108 A126610 A087380
KEYWORD
nonn,base
AUTHOR
Ivan N. Ianakiev, Mar 02 2018
EXTENSIONS
Escape clause added to definition by N. J. A. Sloane, Mar 03 2018
STATUS
approved