login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A293645 Positive numbers that are the sum of two (possibly negative) coprime cubes. 4

%I #53 Nov 06 2023 02:59:53

%S 1,2,7,9,19,26,28,35,37,61,63,65,91,98,117,124,126,127,133,152,169,

%T 189,215,217,218,271,279,316,331,335,341,342,344,351,370,386,387,397,

%U 407,468,469,485,511,513,539,547,559,602,604,631,637,657,665,721,728,730

%N Positive numbers that are the sum of two (possibly negative) coprime cubes.

%C Also sum or difference of two coprime cubes. - _David A. Corneth_, Oct 20 2017

%H David A. Corneth, <a href="/A293645/b293645.txt">Table of n, a(n) for n = 1..10000</a> (first 101 terms from Rosalie Fay)

%e 19 = 3^3 + (-2)^3, where 3 and -2 are coprime, so 19 is in the sequence.

%e 152 = 5^3 + 3^3, where 5 and 3 are coprime, so 152 is in the sequence.

%p filter:= proc(n) local s,x,y;

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

%p x:= s/2 + sqrt(12*n/s-3*s^2)/6;

%p if not x::integer then next fi;

%p y:= s - x;

%p if igcd(x,y) = 1 then return true fi;

%p od;

%p false

%p end proc:

%p select(filter, [seq(seq(9*i+j,j=[1,2,7,8,9]),i=0..1000)]); # _Robert Israel_, Oct 22 2017

%t smax = 100000; (* upper limit for last term *)

%t m0 = smax^(1/3) // Ceiling;

%t f[m_] := f[m] = Module[{c, s, d}, Table[c = CoprimeQ[i^3, j^3]; {s = i^3 + j^3; If[0 < s <= smax && c, s, Nothing], d = j^3 - i^3; If[0 < d <= smax && c, d, Nothing]}, {i, 0, m}, {j, i, m}] // Flatten // Union];

%t f[m = m0];

%t f[m += m0];

%t While[f[m] != f[m - m0], m += m0];

%t f[m] (* _Jean-François Alcover_, Jun 28 2023 *)

%o (PARI) upto(lim) = {my(res = List([2]), c, i, j); for(i=1,sqrtnint(lim, 3), for(j=0, sqrtnint(lim - i^3, 3), if(gcd(i, j) == 1, listput(res, c)))); for(i=1, sqrtint(lim\3)+1, for(j = 1, i, if(gcd(i, j) == 1, c = i^3 - (i-j)^3; if(c<=lim, listput(res, c), next(2))))); listsort(res, 1); res} \\ _David A. Corneth_, Oct 20 2017

%Y Cf. A003325 (positive cubes); A020895 (cubefree); A293646 (only coprime); A293647, A293650.

%K nonn,easy

%O 1,2

%A _Rosalie Fay_, Oct 16 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 06:24 EDT 2024. Contains 371769 sequences. (Running on oeis4.)