# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a103835 Showing 1-1 of 1 %I A103835 #8 May 25 2024 20:46:04 %S A103835 3,11,13,19,23,31,43,53,67,97,113,149,151,173,193,223,239,251,373,389, %T A103835 397,409,431,439,457,479,487,499,569,577,601,647,739,757,797,809,811, %U A103835 821,827,829,863,929,991,1109,1181,1297,1301,1303,1327,1367,1409,1429 %N A103835 Smallest prime p, larger than previous term, such that concatenation of n and p is a prime. %C A103835 Cf. A096915. %e A103835 a(10)=97 because 1097 is prime, while 1071,1073,1079,1083,1089 are all composite. %o A103835 (Python) %o A103835 from sympy import isprime, nextprime %o A103835 def ispal(n): s = str(n); return s == s[::-1] %o A103835 def aupto(lim): %o A103835 n, p, alst = 1, 2, [] %o A103835 while p <= lim: %o A103835 if isprime(int(str(n)+str(p))): n, alst = n + 1, alst + [p] %o A103835 p = nextprime(p) %o A103835 return alst %o A103835 print(aupto(1429)) # _Michael S. Branicky_, Mar 11 2021 %Y A103835 Cf. A096915, A103836. %K A103835 nonn,base %O A103835 1,1 %A A103835 _Zak Seidov_, Mar 30 2005 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE