login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A161354 Cubes whose reversal is a prime number. 1
125, 125000, 140608, 704969, 1643032, 1815848, 3511808, 3723875, 3869893, 7301384, 9393931, 10360232, 11543176, 14526784, 15069223, 15252992, 15813251, 16777216, 19902511, 34328125, 34645976, 35287552, 70444997, 92345408 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
A161354_list = sorted(A161354_list) # Chai Wah Wu, Dec 20 2015
(PARI) lista(nn) = { for(n=1, nn, if(ispseudoprime(eval(concat(Vecrev(Str(n^3))))), print1(n^3, ", ")); ); } \\ Altug Alkan, Dec 20 2015
CROSSREFS
Sequence in context: A030697 A265623 A050640 * A318258 A003751 A120807
KEYWORD
nonn,base
AUTHOR
Claudio Meller, Jun 07 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 10:44 EDT 2024. Contains 371268 sequences. (Running on oeis4.)