OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..4050
EXAMPLE
1815848 is a term because it is a cube and 8485181 is a prime.
MAPLE
rev := proc (n) local nn: nn := convert(n, base, 10): add(nn[j]*10^(nops(nn)-j), j = 1 .. nops(nn)) end proc: a := proc (n) if isprime(rev(n^3)) = true then n^3 else end if end proc: seq(a(n), n = 1 .. 460); # Emeric Deutsch, Jun 27 2009
MATHEMATICA
Select[Range[500]^3, PrimeQ[IntegerReverse[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 03 2019 *)
PROG
(Python)
from sympy import isprime
A161354_list, i, j = [], 0, 0
while j < 10**15:
p = int(str(j)[::-1])
if isprime(p):
A161354_list.append(j)
j += 3*i*(i+1)+1
i += 1
(PARI) lista(nn) = { for(n=1, nn, if(ispseudoprime(eval(concat(Vecrev(Str(n^3))))), print1(n^3, ", ")); ); } \\ Altug Alkan, Dec 20 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Claudio Meller, Jun 07 2009
STATUS
approved