OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..271
MAPLE
revdigs:= proc(n) local L, k;
L:= convert(n, base, 10);
add(L[-k]*10^(k-1), k=1..nops(L))
end proc:
f:= proc(n) local d, k, wmin, v, w;
wmin:= infinity;
for d from 1 do
for k from ceil(10^(d/n)) do
v:= k^n;
if v >= 10^(d+1) then break fi;
w:= revdigs(v);
if isprime(w) and w < wmin then wmin:= w fi;
od;
if wmin < infinity then return wmin fi
od
end proc:
map(f, [$1..20]); # Robert Israel, May 22 2019
MATHEMATICA
Do[ k = 1; While[ r = ToExpression[ StringReverse[ ToString[ k^n ] ] ]; ! PrimeQ[ r ], k++ ]; Print[ r ], {n, 1, 25} ]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Jan 16 2001
STATUS
approved