OFFSET
1,1
COMMENTS
It appears that there are ~ 0.81*100^k/(k^2 log^2 10) 2k-digit numbers in this sequence, making their relative density 0.9/(k^2 log^2 10) among 2k-digit numbers. Of course there are no 2k+1-digit terms in the sequence. - Charles R Greathouse IV, Nov 15 2022
The second Mathematica program below generates all 2-digit and 4-digit terms of the sequence. To generate all 2,753 6-digit terms of the sequence, use this Mathematica program: Select[1000#[[1]]+#[[2]]&/@Tuples[Prime[Range[26,168]],2],PrimeQ]. There are 112,649 8-digit terms of the sequence. - Harvey P. Dale, Feb 28 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 1117 is a term because 11 and 17 are both 2-digit primes and 1117 is prime.
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);
if isprime(p) and isprime(q) then Res:= Res, pq; count:= count+1 fi
od od:
Res;
MATHEMATICA
Select[Prime[Range[640]], EvenQ[(s = IntegerLength[#])] && IntegerDigits[#][[s/2 + 1]] > 0 && And @@ PrimeQ[QuotientRemainder[#, 10^(s/2)]] &] (* Amiram Eldar, Nov 15 2022 *)
Join[Select[FromDigits/@Tuples[Prime[Range[4]], 2], PrimeQ], Select[100#[[1]]+ #[[2]]&/@ Tuples[Prime[Range[5, 25]], 2], PrimeQ]] (* Harvey P. Dale, Feb 28 2023 *)
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): yield t
print(list(islice(agen(), 51))) # Michael S. Branicky, Nov 15 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
J. M. Bergot and Robert Israel, Nov 15 2022
STATUS
approved