OFFSET
1,1
COMMENTS
All terms are odd (see link for proof).
The two sums of primes are different mod 3 (see link for proof).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Robert Israel, Proofs of comments
EXAMPLE
a(3) = 3115 is a term because it is the concatenation of primes 3, 11 and 5 whose sum 19 is prime, and the product of primes 5, 7 and 89 whose sum 101 is prime.
The first term where the concatenation can be done in more than one way is a(30) = 13135 which is the concatenation of 13, 13 and 5 (with sum 31) and also of 131, 3 and 5 (with sum 139).
MAPLE
M:= 5: # for terms with up to M digits
PD[1]:= [2, 3, 5, 7]:
for d from 2 to M-2 do PD[d]:= select(isprime, [seq(i, i=10^(d-1)+1 .. 10^d-1, 2)]) od:
R:= NULL:
for d from 3 to M do
for d1 from 1 to d-2 do
for d2 from 1 to d-d1-1 do
for a in PD[d1] do
for b in PD[d2] do
for c in PD[d-d1-d2] do
if not isprime(a+b+c) then next fi;
t:= a + 10^d1*b + 10^(d1+d2)*c;
F:= ifactors(t)[2];
if add(s[2], s=F) = 3 and isprime(add(s[1]*s[2], s=F)) then
R:= R, t;
fi
od od od od od od:
sort(convert({R}, list));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Will Gosnell and Robert Israel, Jun 29 2025
STATUS
approved
