A137632 Sums of 2 cubes of distinct odd primes.
152, 370, 468, 1358, 1456, 1674, 2224, 2322, 2540, 3528, 4940, 5038, 5256, 6244, 6886, 6984, 7110, 7202, 8190, 9056, 11772, 12194, 12292, 12510, 13498, 14364, 17080, 19026, 24416, 24514, 24732, 25720, 26586, 29302, 29818, 29916, 30134
Offset: 1
Keywords
Examples
3^3 + 5^3 = 152 = a(1). 3^3 + 7^3 = 370 = a(2). 5^3 + 7^3 = 468 = a(3).
Programs
-
Maple
A137632 := proc(amax) local a,p,q; a := {} ; p := 3 ; while p^3 < amax do q := nextprime(p) ; while p^3+q^3 < amax do a := a union {p^3+q^3} ; q := nextprime(q) ; od: p := nextprime(p) ; od: sort(convert(a,list)) ; end: A137632(80000) ; # R. J. Mathar, May 04 2008
-
Mathematica
f[upto_]:=Module[{max=Ceiling[Power[upto-27, (3)^-1]],prs}, prs=Prime[Range[2,max]]; Select[Union[Total/@(Subsets[prs,{2}]^3)], #<=upto&]]; f[31000] (* Harvey P. Dale, Apr 20 2011 *)
Extensions
More terms from R. J. Mathar, Apr 13 2008, May 04 2008