OFFSET
1,1
COMMENTS
To find all differences p^3 - q^3 less than N, it is required that all primes p and q up to sqrt(N/6) be tested.
LINKS
T. D. Noe, Table of n, a(n) for n=1..10000
EXAMPLE
117 belongs to the sequence because it can be written as 5^3 - 2^3.
MATHEMATICA
sumList[x_List, y_List] := (punchline = {}; Do[punchline = Union[punchline, x[[i]] + y], {i, Length[x]}]; punchline); posPart[x_List] := (punchline = {}; Do[If[x[[i]] > 0, punchline = Union[punchline, {x[[i]]}]], {i, Length[x]}]; punchline); posPart[sumList[Prime[Range[10]]^3, - Prime[Range[10]]^3]]
nn=10^5; Union[Reap[Do[n=Prime[i]^3-Prime[j]^3; If[n<=nn, Sow[n]], {i, PrimePi[Sqrt[nn/6]]}, {j, i-1}]][[2, 1]]] (* T. D. Noe, Oct 04 2010 *)
With[{upto=20000}, Select[Abs[#[[1]]-#[[2]]]&/@Subsets[Prime[ Range[ Sqrt[ upto/6]]]^3, {2}]//Union, #<=upto&]] (* Harvey P. Dale, Dec 10 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hollie L. Buchanan II, Jul 11 2003
EXTENSIONS
Corrected by T. D. Noe, Oct 04 2010
STATUS
approved