login
A104318
Primes which are the reverse concatenation of two consecutive cubes.
1
6427, 2700024389, 6400059319, 7408868921, 12597121225043, 29859842924207, 89989128869743, 92610009129329, 1600300815813251, 2057082420346417, 2809446427818127, 3930400038958219, 4214419241781923, 4665600046268279, 6993452869426531, 7303463272511713
OFFSET
1,1
LINKS
EXAMPLE
The first term is 6427 which is a prime and is the reverse concatenation of 27 and 64 which are two consecutive cubes.
MATHEMATICA
rcat[{a_, b_}]:=FromDigits[Join[IntegerDigits[b], IntegerDigits[a]]]; Select[ rcat/@Partition[Range[500]^3, 2, 1], PrimeQ] (* Harvey P. Dale, Feb 21 2012 *)
PROG
(Python)
from sympy import isprime
def aupton(terms):
alst, i, s2 = [], 1, "1"
while len(alst) < terms:
i += 1
s1, s2 = s2, str(i**3)
t = int(s2+s1)
if isprime(t):
alst.append(t)
return alst
print(aupton(16)) # Michael S. Branicky, Jan 08 2022
CROSSREFS
Sequence in context: A259078 A104374 A222554 * A222344 A194720 A140916
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Apr 17 2005
EXTENSIONS
a(15)-a(16) from Lorenzo Pinlac, Jan 08 2022
STATUS
approved