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!)
A158594 Numbers which yield a prime whenever a 3 is prefixed, appended or inserted. 11

%I #19 Jul 29 2019 11:57:37

%S 1,7,11,17,31,37,73,121,271,331,343,359,361,373,533,637,673,733,793,

%T 889,943,1033,1183,2297,3013,3119,3223,3353,3403,3461,3757,3827,3893,

%U 3923,4313,4543,4963,5323,5381,5419,6073,6353,8653,9103,9887,10423,14257

%N Numbers which yield a prime whenever a 3 is prefixed, appended or inserted.

%C 1) It is conjectured that sequences of this type are infinite; also that an infinite number of primes is included.

%C 2) Necessarily a(n) has end digit 1,3,7 or 9.

%C 3) Sum of digits of a(n) has form 3k-1 or 3k+1.

%C 4) Sequence is part of A068674 a(n) n=1,...,30: first 14 primes: 7, 11, 17, 31, 37, 73, 271, 331, 359, 373, 673, 733, 2297, 3461.

%C 5) Note the "world record" 2297: smallest prime which yields five other primes 32297, 23297, 22397, 22937, 22973.

%D Marcus Du Sautoy, The Music of the Primes: Searching to Solve the Greatest Mystery in Mathematics, HarperCollins. 2004

%D Bryan Bunch, Kingdom of Infinite Number: A Field Guide, W.H. Freeman & Company, 2001

%H Jinyuan Wang, <a href="/A158594/b158594.txt">Table of n, a(n) for n = 1..500</a>

%e 109 is not a term: 3109, 1039, 1093 are primes, but 1309 = 7 * 11 * 17.

%e 121 is a term: 3121 (3 prefixed), 1213 (3 appended), 1321 and 1231 (3 inserted) are primes.

%p Lton := proc(L) local i ; add(op(i,L)*10^(i-1),i=1..nops(L) ) ; end: isA158594 := proc(n) local dgs,i,p; dgs := convert(n,base,10) ; p := [3,op(dgs)] ; if not isprime(Lton(p)) then RETURN(false) ; fi; p := [op(dgs),3] ; if not isprime(Lton(p)) then RETURN(false) ; fi; for i from 1 to nops(dgs)-1 do p := [op(1..i,dgs),3,op(i+1..nops(dgs),dgs)] ; if not isprime(Lton(p)) then RETURN(false) ; fi; od: RETURN(true) ; end: for n from 1 to 25000 do if isA158594(n) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, Mar 26 2009

%o (PARI) isok(n)={i=#digits(n);m=1;k=0;while(k<i+1&&m==1,r=n\10^k;s=n-r*10^k;t=r*10^(k+1)+s+3*10^k;if(isprime(t)==0,m=0);k++);m;} \\ _Jinyuan Wang_, Feb 02 2019

%Y Cf. A068674, Numbers which yield primes when a 3 is prefixed or appended.

%Y Cf. A068679, Numbers which yield a prime whenever a 1 is inserted anywhere in them (including at the beginning or end).

%Y Cf. A158232, Numbers which yield primes when "13" is prefixed or appended.

%K nonn,base

%O 1,2

%A Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 22 2009

%E Corrected and extended by _Chris K. Caldwell_ and _R. J. Mathar_, Mar 26 2009

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 24 05:44 EDT 2024. Contains 371918 sequences. (Running on oeis4.)