login
List of pairs: primes whose reversal is also prime, each followed by its reversal.
0

%I #45 Dec 01 2018 09:41:43

%S 2,2,3,3,5,5,7,7,11,11,13,31,17,71,31,13,37,73,71,17,73,37,79,97,97,

%T 79,101,101,107,701,113,311,131,131,149,941,151,151,157,751,167,761,

%U 179,971,181,181,191,191,199,991,311,113,313,313,337,733,347,743,353,353

%N List of pairs: primes whose reversal is also prime, each followed by its reversal.

%F a(2n-1) = A007500(n).

%F a(2n) = A004086(A007500(n)).

%F a(2n) = A095180(n). - _Rémy Sigrist_, Nov 16 2018

%e The sequence begins:

%e 2, 2;

%e 3, 3;

%e 5, 5;

%e 7, 7;

%e 11, 11;

%e 13, 31;

%e 17, 71;

%e 31, 13;

%e 37, 73;

%e 71, 17;

%e ...

%e 107 has its reversal as 701.

%e 971 has its reversal as 179.

%t Flatten@ Table[ If[PrimeQ[r = IntegerReverse@ p], {p,r}, {}], {p, Prime@ Range@ 71}] (* _Giovanni Resta_, Nov 13 2018 *)

%o (PARI) forprime(p=1, 353, r=fromdigits(Vecrev(digits(p))); if (isprime(r), print1(p ", " r ", "))) \\ _Rémy Sigrist_, Nov 16 2018

%Y Subsequence of A135020.

%Y Cf. A000040, A004086, A007500, A095180, A180022.

%K nonn,base,tabf

%O 1,1

%A _Kritsada Moomuang_, Nov 12 2018