cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A293645 #53 Nov 06 2023 02:59:53
%S A293645 1,2,7,9,19,26,28,35,37,61,63,65,91,98,117,124,126,127,133,152,169,
%T A293645 189,215,217,218,271,279,316,331,335,341,342,344,351,370,386,387,397,
%U A293645 407,468,469,485,511,513,539,547,559,602,604,631,637,657,665,721,728,730
%N A293645 Positive numbers that are the sum of two (possibly negative) coprime cubes.
%C A293645 Also sum or difference of two coprime cubes. - _David A. Corneth_, Oct 20 2017
%H A293645 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 A293645 19 = 3^3 + (-2)^3, where 3 and -2 are coprime, so 19 is in the sequence.
%e A293645 152 = 5^3 + 3^3, where 5 and 3 are coprime, so 152 is in the sequence.
%p A293645 filter:= proc(n) local s,x,y;
%p A293645   for s in numtheory:-divisors(n) do
%p A293645     x:= s/2 + sqrt(12*n/s-3*s^2)/6;
%p A293645     if not x::integer then next fi;
%p A293645     y:= s - x;
%p A293645     if igcd(x,y) = 1 then return true fi;
%p A293645   od;
%p A293645   false
%p A293645 end proc:
%p A293645 select(filter, [seq(seq(9*i+j,j=[1,2,7,8,9]),i=0..1000)]); # _Robert Israel_, Oct 22 2017
%t A293645 smax = 100000; (* upper limit for last term *)
%t A293645 m0 = smax^(1/3) // Ceiling;
%t A293645 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 A293645 f[m = m0];
%t A293645 f[m += m0];
%t A293645 While[f[m] != f[m - m0], m += m0];
%t A293645 f[m] (* _Jean-François Alcover_, Jun 28 2023 *)
%o A293645 (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 A293645 Cf. A003325 (positive cubes); A020895 (cubefree); A293646 (only coprime); A293647, A293650.
%K A293645 nonn,easy
%O A293645 1,2
%A A293645 _Rosalie Fay_, Oct 16 2017