OFFSET
1,1
EXAMPLE
810 is in the sequence as it is between the twin primes 809 and 811 and its reverse, 018 or 18, is also between the twin primes 17 and 19.
MATHEMATICA
fQ[n_] := Block[{np = FromDigits[ Reverse[ IntegerDigits[n]]]}, If[np < n && PrimeQ[n - 1] && PrimeQ[n + 1] && PrimeQ[np - 1] && PrimeQ[np + 1], True, False]]; Select[ Range[2, 87220, 2], fQ[ # ] &] (* Robert G. Wilson v, Mar 30 2005 *)
npcQ[n_]:=Module[{ridn=FromDigits[Reverse[IntegerDigits[n]]]}, ridn<n && And@@PrimeQ[ {ridn-1, ridn+1}]]; Select[Mean/@Select[Partition[ Prime[ Range[ 2, 8500]], 2, 1], Last[#]-First[#]==2&], npcQ] (* Harvey P. Dale, Oct 19 2012 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Ray G. Opao, Mar 28 2005
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Mar 30 2005
STATUS
approved