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!)
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

%I #26 Jun 20 2023 18:10:12

%S 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,

%T 23,541,5,3,29,179,17,1721,257,17,5,239,229,199,149,3,13,3,1439,281,

%U 127,107,101,9791,163,31,107,3,3,139,199,83,13,929,83,19,11,11,107,71,181,167,661,1031

%N 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.

%C 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]

%H Harvey P. Dale, <a href="/A300289/b300289.txt">Table of n, a(n) for n = 1..1000</a>

%e 11 is the smallest prime such that 11*prime(1)=22 consists of only prime digits. Therefore a(1) = 11.

%t p[n_] := Module[{k = 1}, While[Union[PrimeQ /@ IntegerDigits[n*Prime[k]]] != {True}, k++]; Prime[k]]; p /@ Prime[Range[100]]

%t 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 *)

%o (PARI) a(n) = {forprime(p=2, , if (#select(x->(! isprime(x)), digits(p*prime(n))) == 0, return (p)););} \\ _Michel Marcus_, Mar 02 2018

%Y Cf. A046034.

%K nonn,base

%O 1,1

%A _Ivan N. Ianakiev_, Mar 02 2018

%E Escape clause added to definition by _N. J. A. Sloane_, Mar 03 2018

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 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)