OFFSET
1,1
COMMENTS
For n > 2, the first and last digit of a(n) are either 2 or 8. - Chai Wah Wu, Jan 06 2016
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
282 is a palindrome and 281 and 283 are twin primes.
MATHEMATICA
palQ[n_]:= n == FromDigits@Reverse@IntegerDigits@n; lst={}; Do[If[palQ[n] && PrimeQ[n-1] && PrimeQ[n+1], AppendTo[lst, n]], {n, 2, 10^7, 2}]; lst
palQ[n_]:=Module[{idn=IntegerDigits[n]}, idn==Reverse[idn]]; Mean[#]&/@ Select[ Select[ Partition[Prime[Range[190000]], 2, 1], Last[#]-First[#] == 2&], palQ[Mean[#]]&] (* Harvey P. Dale, Jan 18 2012 *)
PROG
(PARI) isok(n) = my(d = digits(n)); (Vecrev(d)==d) && isprime(n-1) && isprime(n+1); \\ Michel Marcus, Jan 08 2016
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Giovanni Resta, Jan 24 2006
STATUS
approved