|
|
|
|
2, 3, 7, 5, 11, 7, 727, 383, 727, 757, 727, 787, 929, 72727, 30103, 30703, 32323, 34543, 36563, 38183, 38783, 72727, 78487, 70507, 72727, 74747, 76367, 78787, 1242421, 90709, 94349, 94949, 96769, 98389, 1412141, 1242421, 1832381, 9923299, 7278727
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
Prime corresponding to the palindrome 121 is 727.
|
|
PROG
|
(Python)
from itertools import count, islice
from sympy import isprime
def A087387_gen(): # generator of terms
for n in count(2):
q =(c:=n-x)*x+int(str(c)[-2::-1] or 0) if n<(x:=10**(len(str(n>>1))-1))+(y:=10*x) else (c:=n-y)*y+int(str(c)[::-1] or 0)
r = next(p for p in count(q+1, q) if isprime(p))
if(s:=str(r))[:(t:=len(s)+1>>1)]==s[:-t-1:-1]:
yield r
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|