OFFSET
1,1
MATHEMATICA
Do[ k = 2; While[ ! PrimeQ[ k ] || ! PrimeQ[ ToExpression[ StringReverse[ ToString[ k^n ] ] ] ], k++ ]; Print[ k ], {n, 1, 100} ]
sprp[n_]:=Module[{p=2}, While[CompositeQ[IntegerReverse[p^n]], p= NextPrime[ p]]; p]; Array[sprp, 70] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 28 2019 *)
PROG
(Python)
from sympy import isprime, nextprime
def ok(p, n): return isprime(int(str(p**n)[::-1]))
def a(n):
p = 2
while not ok(p, n): p = nextprime(p)
return p
print([a(n) for n in range(1, 63)]) # Michael S. Branicky, Feb 19 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Feb 06 2001
STATUS
approved