This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A059215 #9 Jul 16 2023 08:39:30 %S A059215 2,4,5,2,2,16,2,8,32,2,17,4,25,28,8,53,2,25,79,95,47,46,28,2,19,5,85, %T A059215 86,541,32,104,314,25,115,4,5,2,25,67,71,142,226,5,53,2,304,14,106,85, %U A059215 8,238,128,185,23,2,65,565,122,136,668,23,37,28,1117,178,5,74 %N A059215 Least number k such that k^n reversed is a prime. %C A059215 a(2) = 2 since 1^2, 2^2, 3^2 and 4^2 reversed are 1, 4, 9 and 61 and 61 is the first prime. %C A059215 a(3) = 5 since 1^3, 2^3, 3^3, 4^3, and 5^3 reversed are 1, 8, 72, 46 and 521 and 521 is the first prime. %H A059215 Michael S. Branicky, <a href="/A059215/b059215.txt">Table of n, a(n) for n = 1..1000</a> %t A059215 Do[ k = 2; While[ ! PrimeQ[ ToExpression[ StringReverse[ ToString[ k^n ] ] ] ], k++ ]; Print[ k ], {n, 1, 50} ] %t A059215 lnk[n_]:=Module[{k=1},While[!PrimeQ[IntegerReverse[k^n]],k++];k]; Array[ lnk,50] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Mar 20 2021 *) %o A059215 (Python) %o A059215 from itertools import count %o A059215 from gmpy2 import digits, is_prime %o A059215 def a(n): return next(k for k in count(2) if is_prime(int(digits(k**n)[::-1]))) %o A059215 print([a(n) for n in range(1, 68)]) # _Michael S. Branicky_, Jul 16 2023 %Y A059215 Cf. A004086. %K A059215 nonn,base %O A059215 1,1 %A A059215 _Robert G. Wilson v_, Jan 16 2001 %E A059215 a(51) and beyond from _Michael S. Branicky_, Jul 16 2023