|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|