login
A058997
Least power k greater than 1 for which n^k reversed is a prime, or 0 if impossible.
0
0, 4, 0, 2, 3, 0, 12, 8, 0, 0, 0, 0, 379, 2, 0, 6, 11, 0, 2, 0, 0, 0, 8, 0, 13, 47, 0, 2, 7, 0, 4, 2, 0
OFFSET
1,2
MATHEMATICA
Do[ If[ Mod[ n, 3 ] != 0 && Mod[ n, 10 ] != 0 && Mod[ n, 11 ] != 0, k = 2; While[ !PrimeQ[ ToExpression[ StringReverse[ ToString[ n^k ] ] ] ], k++ ]; Print[ k ], Print[ 0 ] ], {n, 2, 33} ]
CROSSREFS
Sequence in context: A109157 A226955 A123314 * A261164 A323982 A279415
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Jan 17 2001
STATUS
approved