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!)
A358420 Primes that are the concatenation p|q of two primes p and q with the same number of digits, where r = (p+q)/2, r|q and p|r are all primes. 1
1123, 101197, 101293, 101797, 107827, 109313, 113149, 151163, 151607, 151643, 163199, 163811, 179947, 193541, 211271, 223331, 239263, 251263, 251443, 263191, 271967, 281353, 281557, 307367, 331283, 337397, 353929, 359167, 359599, 367547, 383659, 383983, 389569, 401773, 419467, 421241, 421397 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 101293 is a term because 101293, 101, 293, (101+293)/2 = 197, 101197 and 197293 are all primes.
MAPLE
Res:= NULL: count:= 0:
for d from 2 by 2 while count < 100 do
pq:= 10^(d-1);
while count < 100 do
pq:= nextprime(pq);
if pq > 10^d then break fi;
q:= pq mod 10^(d/2);
if q < 10^(d/2-1) then next fi;
p:= (pq-q)/10^(d/2);
r:= (p+q)/2;
if not (r::integer and isprime(q) and isprime(p) and isprime(r)) then next fi;
if isprime(p*10^(d/2)+r) and isprime(r*10^(d/2)+q) then Res:= Res, pq; count:= count+1; fi
od;
od:
Res;
PROG
(Python)
from itertools import count, islice
from sympy import isprime, primerange
def agen(): # generator of terms
for d in count(1):
pow = 10**d
for p in primerange(10**(d-1), pow):
for q in primerange(10**(d-1), pow):
t = p*pow + q
if isprime(t):
r = (p+q)//2
if all(isprime(t) for t in [r, r*pow + q, p*pow + r]):
yield t
print(list(islice(agen(), 37))) # Michael S. Branicky, Nov 15 2022
CROSSREFS
Contained in A358421.
Sequence in context: A261264 A125840 A069984 * A104285 A260898 A358395
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Nov 14 2022
STATUS
approved

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 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)