login
Primes p such that (p reversed)+2 is a prime.
5

%I #8 Sep 08 2022 08:45:47

%S 3,5,11,17,53,59,71,101,113,137,173,191,503,509,521,557,563,569,587,

%T 593,599,701,719,743,773,941,947,971,1019,1031,1049,1109,1163,1277,

%U 1283,1301,1319,1373,1409,1427,1433,1439,1451,1493,1511,1523,1571,1583,1601

%N Primes p such that (p reversed)+2 is a prime.

%H Vincenzo Librandi, <a href="/A165446/b165446.txt">Table of n, a(n) for n = 1..1000</a>

%e 17 is in the sequence because 71+2=73 prime; 971 is in the sequence because 179+2=181 prime.

%t Select[Prime[Range[2, 1700]], PrimeQ[FromDigits[Reverse[IntegerDigits[#]]] + 2]&](* _Vincenzo Librandi_, Sep 15 2013 *)

%o (Magma) [p: p in PrimesInInterval(2,400) | IsPrime(q+2) where q is Seqint(Reverse(Intseq(p)))]; // _Vincenzo Librandi_, Sep 15 2013

%K nonn,base

%O 1,1

%A _Vincenzo Librandi_, Sep 20 2009

%E Edited by _N. J. A. Sloane_, Sep 20 2009