OFFSET
1,1
COMMENTS
Original name: Twin palindromic primes (upper terms).
Twin palindromic primes are of odd length and differ by one from the middle digit outwards. There are no palindromic primes of even length except 11.
Conjecture: sequence is finite. - Charles R Greathouse IV, Mar 22 2011
REFERENCES
Martin Gardner, "The Ambidextrous Universe", Penguin Press, Sec. Ed. 1982, pp. 39-41.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Patrick De Geest, World!Of Palindromic Primes
Sean A. Irvine, Java program (github)
MATHEMATICA
nLP[cn_Integer]:=Module[{s, len, half, left, pal, fdpal}, s=IntegerDigits[cn]; len=Length[s]; half=Ceiling[len/2]; left=Take[s, half]; pal=Join[left, Reverse[Take[left, Floor[len/2]]]]; fdpal=FromDigits[pal]; Which[cn==9, 11, fdpal>cn, fdpal, True, left=IntegerDigits[FromDigits[left]+1]; pal=Join[left, Reverse[Take[left, Floor[len/2]]]]; FromDigits[pal]]]; Select[Partition[NestList[nLP, 1, 3000], 2, 1], AllTrue[#, PrimeQ]&][[;; , 2]] (* Harvey P. Dale, Sep 07 2025 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
EXTENSIONS
Changed offset to 1 by N. J. A. Sloane, Feb 15 2015
Name changed by Sean A. Irvine, Sep 06 2025
STATUS
approved
