OFFSET
1,1
EXAMPLE
a(12)=12821 is palindromic prime and its middle digit 8 is not prime, a(13)=13831 is palindromic prime and its middle digit 8 is not prime, a(14)=13931 is palindromic prime and its middle digit 9 is not prime, ...
MAPLE
ts_num_midpal := proc(n) local ad, adr, midigit; ad := convert(n, base, 10): adr := ListTools[Reverse](ad): if nops(ad) mod 2 = 0 then return 1; fi; midigit := op( (nops(ad)+1)/2, ad ): if (isprime( midigit )='false' and adr=ad) then return 0; else return 1; fi end: ts_pra_n_pal := proc(n) local p1; p1 := ithprime(n): if ts_num_midpal(p1) = 0 then return (p1) fi end: apranpal := [seq(ts_pra_n_pal(i), i=1..100000)]: apranpal;
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Jani Melik, Oct 21 2002
STATUS
approved