VOOZH
about
URL: https://oeis.org/A110786
⇱ A110786 - OEIS
login
A110786
To obtain a(n), take the n-th palindrome P =
A002113
(n) and concatenate it with the smallest palindrome Q such that PQ is a prime.
2
11, 23, 31, 41, 53, 61, 71, 83, 97, 113, 223, 331, 443, 557, 661, 773, 881, 991, 1013, 1117, 1213, 1319, 14177, 1511, 1613, 171131, 1811, 1913, 2027, 2129, 2221, 232171, 2423, 2521, 2621, 2729, 28211, 2927, 3037, 3137, 32377, 3331, 3433, 3533
(
list
;
graph
;
refs
;
listen
;
history
;
text
;
internal format
)
OFFSET
1,1
LINKS
Table of n, a(n) for n=1..44.
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
Cf.
A030675
,
A110787
.
Sequence in context:
A077501
A337845
A030675
*
A059642
A090920
A344175
Adjacent sequences:
A110783
A110784
A110785
*
A110787
A110788
A110789
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