OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
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
Amarnath Murthy, Sep 09 2003
EXTENSIONS
More terms from David Wasserman, May 25 2005
STATUS
approved