login
Primes p such that 2^p reversed is a prime.
0

%I #23 Sep 08 2022 08:46:22

%S 5,7,17,37,107,137,271

%N Primes p such that 2^p reversed is a prime.

%C Equivalently, primes in A057708. - _Muniru A Asiru_, Dec 25 2018

%t Select[Prime[Range[100]], PrimeQ[ToExpression[StringReverse[ToString[2^#]]]] &]

%o (Magma) [p: p in PrimesUpTo(200) | IsPrime(Seqint(Reverse(Intseq(2^p))))];

%o (PARI) isok(p) = isprime(p) && isprime(fromdigits(Vecrev(digits(2^p)))); \\ _Michel Marcus_, Sep 22 2018

%o (GAP) P0:=List(List([1..300],j->Reversed(ListOfDigits(2^j))),k->Sum([1..Size(k)],i->k[i]*10^(Size(k)-i)));;

%o a:=Filtered([1..Length(P0)],m->IsPrime(m) and IsPrime(P0[m]));; Print(a); # _Muniru A Asiru_, Dec 25 2018

%Y Cf. A059706.

%Y Subsequence of A057708.

%K nonn,base,more

%O 1,1

%A _Vincenzo Librandi_, Sep 22 2018