OFFSET
1,1
COMMENTS
The last term of the finite series is a(63) = 123467898764321.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..63 (complete sequence)
Patrick De Geest, World of Palindromic Primes
EXAMPLE
13831 belongs to the sequence as it is a palindromic prime in which the digits are increasing up to the middle digit 8 and then decreasing.
PROG
(Python)
from sympy import isprime
from itertools import combinations
def agen():
for digits in range(1, 19):
for left in combinations("123456789", (digits+1)//2):
left = "".join(left)
yield int(left + (left[:digits//2])[::-1])
print(list(filter(isprime, agen()))) # Michael S. Branicky, Apr 25 2021
CROSSREFS
KEYWORD
nonn,base,easy,fini,full
AUTHOR
Amarnath Murthy, Jun 23 2001
EXTENSIONS
Corrected and edited by Patrick De Geest, Jun 07 2003
STATUS
approved