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”).

Primes formed by concatenating a prime with the preceding prime.
6

%I #23 Jan 05 2022 10:51:06

%S 53,5347,5953,6761,137131,179173,211199,223211,239233,263257,359353,

%T 541523,593587,613607,631619,653647,659653,757751,809797,977971,

%U 997991,1009997,11091103,11291123,12371231,13991381,15591553,17831777,19311913,19791973,19931987,23092297

%N Primes formed by concatenating a prime with the preceding prime.

%H K. D. Bajpai, <a href="/A088784/b088784.txt">Table of n, a(n) for n = 1..10300</a>

%e a(2) = 5347 because 5347 is 53 (a prime) concatenated with 47 (the preceding prime).

%t concatpr[n_]:=FromDigits[Join[IntegerDigits[n],IntegerDigits[ NextPrime[ n,-1]]]]; Select[concatpr/@Prime[Range[400]],PrimeQ] (* _Harvey P. Dale_, May 12 2011 *)

%o (PARI) for(n=1,10^3,p=prime(n); q=concat(Str(p),Str(precprime(p-1))); if(isprime(eval(q)), print1(q,", "))) \\ _Derek Orr_, Aug 14 2014

%o (Python)

%o from itertools import islice

%o from sympy import isprime, nextprime

%o def agen(): # generator of terms

%o p, pstr = 2, "2"

%o while True:

%o q = nextprime(p)

%o qstr = str(q)

%o t = int(qstr + pstr)

%o if isprime(t):

%o yield t

%o p, pstr = q, qstr

%o print(list(islice(agen(), 32))) # _Michael S. Branicky_, Jan 05 2022

%Y Cf. A088712.

%K base,nonn

%O 1,1

%A Chuck Seggelin (barkeep(AT)plasteredDragon.com), Oct 15 2003

%E Terms a(30), a(31) and a(32) added by _K. D. Bajpai_, Aug 14 2014