OFFSET
1,1
EXAMPLE
The palindrome 171 gives a prime 171131 when concatenated with 131 and no palindrome less than 131 gives a prime on concatenation: 1711,1713,1717,1719,17111, etc. up to 171121 are all composite.
PROG
(Python)
from itertools import count
from sympy import isprime
def A110786(n):
s = str((c:=n+1-x)*x+int(str(c)[-2::-1] or 0) if n+1<(x:=10**(len(str(n+1>>1))-1))+(y:=10*x) else (c:=n+1-y)*y+int(str(c)[::-1] or 0))
for k in count(2):
if isprime(pq:=int(s+str((c:=k-x)*x+int(str(c)[-2::-1] or 0) if k<(x:=10**(len(str(k>>1))-1))+(y:=10*x) else (c:=k-y)*y+int(str(c)[::-1] or 0)))):
return pq # Chai Wah Wu, Jul 10 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Aug 12 2005
EXTENSIONS
More terms from Giovanni Resta, Feb 08 2006
Edited by N. J. A. Sloane, Jan 16 2009
STATUS
approved