OFFSET
1,2
COMMENTS
Because x^3-y^3 = (x-y)(x^2+xy+y^2), the difference of two cubes is a prime number only if x=y+1, in which case all the primes are cuban, see A002407.
The difference can be a square (see A038597), but Fermat's Last Theorem prevents the difference from ever being a cube. Beal's Conjecture implies that there are no higher odd powers in this sequence.
If n is in the sequence, it must be x^3-y^3 where 0 < y <= x < n^(1/2). - Robert Israel, Dec 24 2017
LINKS
T. D. Noe and Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 1000 from Noe)
MAPLE
N:= 10^4: # to get all terms <= N
sort(convert(select(`<=`, {0, seq(seq(x^3-y^3, y=1..x-1), x=1..floor(sqrt(N)))}, N), list)); # Robert Israel, Dec 24 2017
MATHEMATICA
nn=10^5; p=3; Union[Reap[Do[n=i^p-j^p; If[n<=nn, Sow[n]], {i, Ceiling[(nn/p)^(1/(p-1))]}, {j, i}]][[2, 1]]]
With[{nn=60}, Take[Union[Abs[Flatten[Differences/@Tuples[ Range[ nn]^3, 2]]]], nn]] (* Harvey P. Dale, May 11 2014 *)
PROG
(PARI) list(lim)=my(v=List([0]), a3); for(a=2, sqrtint(lim\3), a3=a^3; for(b=if(a3>lim, sqrtnint(a3-lim-1, 3)+1, 1), a-1, listput(v, a3-b^3))); Set(v) \\ Charles R Greathouse IV, Jan 25 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Oct 06 2010
STATUS
approved