|
|
A103836
|
|
Smallest palindromic prime p, larger than previous term, such that concatenation of n and p is a prime.
|
|
1
|
|
|
3, 11, 181, 373, 12821, 14741, 32323, 72227, 74747, 77977, 78887, 79997, 90709, 94049, 94849, 98689, 1055501, 1065601, 1114111, 1129211, 1134311, 1177711, 1180811, 1186811, 1190911, 1262621, 1333331, 1338331, 1407041, 1409041, 1411141, 1461641, 1463641
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 373 because 4373 is prime, while 4191, 4313, 4353 are all composite.
|
|
PROG
|
(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 ispal(p) and isprime(int(str(n)+str(p))): n, alst = n + 1, alst + [p]
p = nextprime(p)
return alst
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|