[go: up one dir, main page]

login
Search: a088712 -id:a088712
     Sort: relevance | references | number | modified | created      Format: long | short | data
Primes formed by concatenating a prime with the preceding prime.
+10
6
53, 5347, 5953, 6761, 137131, 179173, 211199, 223211, 239233, 263257, 359353, 541523, 593587, 613607, 631619, 653647, 659653, 757751, 809797, 977971, 997991, 1009997, 11091103, 11291123, 12371231, 13991381, 15591553, 17831777, 19311913, 19791973, 19931987, 23092297
OFFSET
1,1
LINKS
EXAMPLE
a(2) = 5347 because 5347 is 53 (a prime) concatenated with 47 (the preceding prime).
MATHEMATICA
concatpr[n_]:=FromDigits[Join[IntegerDigits[n], IntegerDigits[ NextPrime[ n, -1]]]]; Select[concatpr/@Prime[Range[400]], PrimeQ] (* Harvey P. Dale, May 12 2011 *)
PROG
(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
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen(): # generator of terms
p, pstr = 2, "2"
while True:
q = nextprime(p)
qstr = str(q)
t = int(qstr + pstr)
if isprime(t):
yield t
p, pstr = q, qstr
print(list(islice(agen(), 32))) # Michael S. Branicky, Jan 05 2022
CROSSREFS
Cf. A088712.
KEYWORD
base,nonn
AUTHOR
Chuck Seggelin (barkeep(AT)plasteredDragon.com), Oct 15 2003
EXTENSIONS
Terms a(30), a(31) and a(32) added by K. D. Bajpai, Aug 14 2014
STATUS
approved
Integers n such that the concatenation of prime(n) and prime(n+1) and also concatenation of prime(n+1) and prime(n) are prime.
+10
1
46, 51, 55, 71, 99, 119, 164, 298, 345, 461, 509, 523, 588, 668, 779, 827, 844, 848, 999, 1100, 1151, 1215, 1306, 1321, 1408, 1553, 1568, 1616, 1779, 1900, 1931, 1953, 2102, 2150, 2221, 2444, 2653, 2677, 3116, 3405, 3527, 3731, 3776, 3890, 3898, 3989, 4070, 4188, 4257, 4546, 4556, 4574, 4681, 4694, 4846, 4947, 4948, 4974
OFFSET
1,1
COMMENTS
Difference between prime(n) and prime(n+1) is a multiple of 6, otherwise concatenation prime(n)//prime(n+1) is divisible by 3.
EXAMPLE
prime(46)=199, prime(47)=211 and both 199211 and 211199 are prime,
prime(51)=233, prime(51)=239 and both 233239 and 239233 are prime,
prime(9999972)=179424263, prime(9999973)=179424269 and both 179424263179424269 and 179424269179424263 are prime.
MATHEMATICA
PrimePi/@Select[Partition[Prime[Range[5000]], 2, 1], AllTrue[{FromDigits[ Join[ IntegerDigits[ #[[1]]], IntegerDigits[#[[2]]]]], FromDigits[ Join[ IntegerDigits[#[[2]]], IntegerDigits[#[[1]]]]]}, PrimeQ]&][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 14 2021 *)
PROG
(PARI) isok(n) = {my(sp = Str(prime(n))); my(sq = Str(prime(n+1))); isprime(eval(concat(sp, sq))) && isprime(eval(concat(sq, sp))); } \\ Michel Marcus, Mar 07 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Mar 07 2016
STATUS
approved
Primes prime(k) such that the concatenation prime(k+1)//prime(k) is also prime.
+10
0
3, 47, 53, 61, 131, 173, 199, 211, 233, 257, 353, 523, 587, 607, 619, 647, 653, 751, 797, 971, 991, 997, 1103, 1123, 1231, 1381, 1553, 1777, 1913, 1973, 1987, 2297, 2333, 2341, 2399, 2677, 2861, 3049, 3191, 3259, 3607, 3637, 3761, 3989
OFFSET
1,1
COMMENTS
53, 211, 653, 997, ... are also in A088712.
The role of the two primes is swapped in comparison to A030459.
The result of the concatenation is in A088784.
FORMULA
a(n) = A151799(A088712(n)).
EXAMPLE
The prime 53 is in the sequence because the next prime is 59 and 5953 is a prime.
MAPLE
read("transforms") ;
for n from 1 to 600 do p := ithprime(n) ; q := nextprime(p) ; r := digcat2(q, p) ; if isprime(r) then printf("%d, ", p) ; end if; end do: # R. J. Mathar, Jan 27 2011
MATHEMATICA
Transpose[Select[Partition[Prime[Range[600]], 2, 1], PrimeQ[FromDigits[ Flatten[ IntegerDigits/@Reverse[#]]]]&]][[1]] (* Harvey P. Dale, Feb 02 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Jan 27 2011
STATUS
approved

Search completed in 0.038 seconds