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.

A293647 Positive numbers that are the sum of two (possibly negative) cubes in at least 2 ways (primitive solutions).

Original entry on oeis.org

91, 152, 189, 217, 513, 721, 728, 999, 1027, 1729, 3087, 3367, 4104, 4706, 4921, 4977, 5256, 5859, 6832, 7657, 8587, 8911, 9919, 10621, 10712, 12663, 12691, 12824, 14911, 15093, 15561, 16120, 16263, 20683, 21014, 23058, 23877, 25669, 27937, 28063, 31519, 32984
Offset: 1

Views

Author

Rosalie Fay, Oct 16 2017

Keywords

Comments

Primitive means that the 4 summands are coprime.
Not every term is the sum of two coprime cubes.
a(1) = A047696(2).

Examples

			189 = 4^3 + 5^3 = 6^3 + (-3)^3 and 4, 5, 6, -3 are coprime, so 189 is in the sequence.
35208 = 34^3 + (-16)^3 = 33^3 + (-9)^3 and 34, -16, 33, -9 are coprime, so 35208 is in the sequence.
		

Crossrefs

Cf. A051347 (all solutions); A018850 (positive cubes); A293648 (only coprime); A293645, A293650

Programs

  • Maple
    g:= proc(s,n) local x;
      x:= s/2 + sqrt(12*n/s-3*s^2)/6;
      if not x::integer then return NULL fi;
      [x,s - x];
    end proc:
    filter:= proc(n)
      local pairs, i,j;
      pairs:= map(g, numtheory:-divisors(n),n);
      for i from 2 to nops(pairs) do
        for j from 1 to i-1 do
          if igcd(op(pairs[i]),op(pairs[j]))=1 then return true fi
      od od;
      false
    end proc:
    select(filter, [seq(seq(9*i+j,j=[1,2,7,8,9]),i=0..4000)]); # Robert Israel, Oct 22 2017
  • Mathematica
    g[s_, n_] := Module[{x}, x = s/2 + Sqrt[12*n/s - 3*s^2]/6;   If[!IntegerQ[x], Return[Nothing]]; {x, s - x}];
    filter[n_] := Module[{pairs, i, j}, pairs = g[#, n]& /@ Divisors[n]; For[i = 2, i <= Length[pairs], i++,For[j = 1, j <= i - 1, j++, If[GCD @@ Join[pairs[[i]], pairs[[j]]] == 1, Return[True]]]]; False];
    Select[Flatten[Table[Table[9*i + j, {j, {1, 2, 7, 8, 9}}], {i, 0, 4000}]], filter] (* Jean-François Alcover, May 28 2023, after Robert Israel *)