A307585 Positive sums of two distinct cubes (of arbitrary sign).
1, 7, 8, 9, 19, 26, 27, 28, 35, 37, 56, 61, 63, 64, 65, 72, 91, 98, 117, 124, 125, 126, 127, 133, 152, 169, 189, 208, 215, 216, 217, 218, 224, 243, 271, 279, 280, 296, 316, 331, 335, 341, 342, 343, 344, 351, 370, 386, 387, 397, 407, 448, 468, 469, 485, 488, 504, 511, 512, 513, 520, 539, 547, 559
Offset: 1
Keywords
Examples
a(3) = 8 = 0^3 + 2^3. a(4) = 9 = 1^3 + 2^3. a(5) = 19 = (-2)^3 + 3^3.
Links
Programs
-
Maple
filter:= proc(n) local d, dp, r; for d in numtheory:-divisors(n) do dp:= n/d; r:= 12*dp - 3*d^2; if r > 0 and issqr(r) and (sqrt(r)/6 + d/2)::integer then return true fi od; false end proc: select(filter, [$0..1000]);
-
Mathematica
filterQ[n_] := Module[{d, dp, r}, Catch[Do[dp = n/d; r = 12 dp - 3 d^2; If[r > 0 && IntegerQ[Sqrt[r]] && IntegerQ[Sqrt[r]/6 + d/2], Throw[True]], {d, Divisors[n]}]; False]]; Select[Range[1000], filterQ] (* Jean-François Alcover, Oct 17 2020, after Maple *)
Comments