OFFSET
1,1
COMMENTS
It appears that the sequence is infinite.
LINKS
Andreas Boe, Table of n, a(n) for n = 1..10000
EXAMPLE
111329 -> 11 + 13 + 29 = 53 = prime.
PROG
(Python)
from sympy import isprime, primerange
from itertools import count, islice, product
def agen(): yield from (a*10**(2*i) + b*10**i + c for i in count(1) for a, b, c in product(primerange(10**(i-1), 10**i), repeat=3) if isprime(a+b+c))
print(list(islice(agen(), 42))) # Michael S. Branicky, Dec 04 2022
(PARI) first(n) = { my(res = List()); for(i = 1, oo, pow10 = 10^i; pow100 = 100^i; forprime(p = 10^(i-1), 10^i, firstidigs = pow100 * p; forprime(q = 10^(i-1), 10^i, pandq = p+q; first2idigs = firstidigs + pow10*q; forprime(r = 10^(i-1), 10^i, if(isprime(pandq + r), c = first2idigs + r; listput(res, c); if(#res >= n, return(res) ) ) ) ) ) ) } \\ David A. Corneth, Dec 04 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Andreas Boe, Jun 10 2014
STATUS
approved