|
|
A164834
|
|
Numbers such that the two adjacent integers are a perfect cube and a prime.
|
|
2
|
|
|
2, 28, 126, 728, 3374, 6858, 19682, 24390, 29790, 50652, 91126, 250048, 274626, 300762, 328510, 357912, 571788, 753570, 970298, 1157626, 1295028, 1442898, 1771560, 1860868, 2146688, 2146690, 2460374, 2924208, 3048624, 3442950, 3581578, 4492124, 5000212
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
2 is a term since 2 has adjacent numbers 1 (cube) and 3 (prime).
28 is a term since 28 has adjacent numbers 27 (cube) and 29 (prime).
728 is a term since 728 has adjacent numbers 727 (prime) and 729 (cube).
|
|
MATHEMATICA
|
Select[Which[PrimeQ[ #+2], #+1, PrimeQ[ #-2], #-1, True, 0]&/@(Range[1000]^3), #!=0&] (* Harvey P. Dale, Sep 29 2009 *)
|
|
PROG
|
(Python)
from sympy import isprime
def aupto(limit):
i, c, alst = 1, 1, []
while c <= limit + 1:
if isprime(c-2) and c-1 <= limit: alst.append(c-1)
if isprime(c+2) and c+1 <= limit: alst.append(c+1)
i += 1
c = i**3
return alst
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|