OFFSET
1,1
COMMENTS
a(n) is itself prime for n = 1, 2, 3, 4, 5, 6, 8, 11, 12, 22, 26, 27, 30, 31, 32, 34, ... where a(n) = 2, 3, 5, 7, 11, 131, 191, 313, 373, 797, 101, 10301, 11311, 12721, 131, 13931, which are also in A002385. Although 979 begins with the prime p(25) = 97, and is a palindrome, it is not in the commented subsequence because 979 = 11 * 89 is semiprime rather than prime.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
EXAMPLE
a(6) = 131 because that is the smallest palindrome beginning (base 10) with p(6) = 13.
PROG
(Python)
from sympy import prime
def A185267(n):
p = prime(n)
s = str(p)
if s == s[::-1]:
return p
for i in range(1, len(s)):
if s[i:] == s[-1:i-1:-1]:
return int(s+s[i-1::-1]) # Chai Wah Wu, Aug 27 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jonathan Vos Post, Feb 19 2011
STATUS
approved