login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Positive sums of two distinct cubes (of arbitrary sign).
1

%I #16 Oct 19 2020 12:35:54

%S 1,7,8,9,19,26,27,28,35,37,56,61,63,64,65,72,91,98,117,124,125,126,

%T 127,133,152,169,189,208,215,216,217,218,224,243,271,279,280,296,316,

%U 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

%N Positive sums of two distinct cubes (of arbitrary sign).

%C All terms == 0, 1, 2, 7 or 8 (mod 9).

%H Robert Israel, <a href="/A307585/b307585.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Su#ssq">Index to sequences related to sums of cubes</a>

%e a(3) = 8 = 0^3 + 2^3.

%e a(4) = 9 = 1^3 + 2^3.

%e a(5) = 19 = (-2)^3 + 3^3.

%p filter:= proc(n) local d, dp, r;

%p for d in numtheory:-divisors(n) do

%p dp:= n/d;

%p r:= 12*dp - 3*d^2;

%p if r > 0 and issqr(r) and (sqrt(r)/6 + d/2)::integer then return true fi

%p od;

%p false

%p end proc:

%p select(filter, [$0..1000]);

%t 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]];

%t Select[Range[1000], filterQ] (* _Jean-François Alcover_, Oct 17 2020, after Maple *)

%Y Contained in A045980. Contains A024670.

%Y Primes in this sequence: A002407.

%Y Cf. A060464.

%K nonn

%O 1,2

%A _Robert Israel_, Apr 15 2019