A103835 Smallest prime p, larger than previous term, such that concatenation of n and p is a prime.
3, 11, 13, 19, 23, 31, 43, 53, 67, 97, 113, 149, 151, 173, 193, 223, 239, 251, 373, 389, 397, 409, 431, 439, 457, 479, 487, 499, 569, 577, 601, 647, 739, 757, 797, 809, 811, 821, 827, 829, 863, 929, 991, 1109, 1181, 1297, 1301, 1303, 1327, 1367, 1409, 1429
Offset: 1
Examples
a(10)=97 because 1097 is prime, while 1071,1073,1079,1083,1089 are all composite.
Programs
-
Python
from sympy import isprime, nextprime def ispal(n): s = str(n); return s == s[::-1] def aupto(lim): n, p, alst = 1, 2, [] while p <= lim: if isprime(int(str(n)+str(p))): n, alst = n + 1, alst + [p] p = nextprime(p) return alst print(aupto(1429)) # Michael S. Branicky, Mar 11 2021
Comments