(MAGMAMagma) m:=1853; a:=[]; a2:={}; for n in [1..m] do p:=1; u:= a2 join { x: x in a }; while p in u do p:=p+1; end while; if p gt m then break; end if; a2:=a2 join { x^3 + p^3: x in a | x^3 + p^3 le m }; Append(~a, p); end for; print a2;
(MAGMAMagma) m:=1853; a:=[]; a2:={}; for n in [1..m] do p:=1; u:= a2 join { x: x in a }; while p in u do p:=p+1; end while; if p gt m then break; end if; a2:=a2 join { x^3 + p^3: x in a | x^3 + p^3 le m }; Append(~a, p); end for; print a2;
proposed
approved
editing
proposed
max = 2000; A031980 = {1}; Do[ m = Ceiling[(n - 1)^(1/3)]; s = Select[ A031980, # <= m &]; ls = Length[s]; sumOfCubes = Union[Flatten[ Table[s[[i]]^3 + s[[j]]^3, {i, 1, ls}, {j, i + 1, ls}]]]; If[FreeQ[sumOfCubes, n], AppendTo[ A031980, n] ], {n, 2, max}]; Complement[Range[max], A031980] (* Jean-François Alcover, Sep 03 2013 *)
approved
editing
_Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), _, Jul 16 2008
<a href="/Sindx_index/Su.html#ssq">Index to sequences related to sums of squares and sums of cubes</a>
Klaus Brockhaus, <a href="/A141805/b141805.txt">Table of n, a(n) for n = 1..24834</a>
<a href="/Sindx_Su.html#ssq">Index to sequences related to sums of squares and sums of cubes</a>
nonn,new
nonn
K. Klaus Brockhaus, <a href="b141805.txt">Table of n, a(n) for n = 1..24834</a>
nonn,new
nonn
K. Brockhaus, <a href="http://www.research.att.com/~njas/sequences/b141805.txt">Table of n, a(n) for n = 1..24834</a>
<a href="http://www.research.att.com/~njas/sequences/Sindx_Su.html#ssq">Index to sequences related to sums of squares and sums of cubes</a>
nonn,new
nonn
Complement of A031980.
9, 28, 35, 65, 72, 91, 126, 133, 152, 189, 217, 224, 243, 280, 341, 344, 351, 370, 407, 468, 513, 520, 539, 559, 576, 637, 728, 855, 1001, 1008, 1027, 1064, 1125, 1216, 1332, 1339, 1343, 1358, 1395, 1456, 1512, 1547, 1674, 1729, 1736, 1755, 1792, 1843, 1853
1,1
K. Brockhaus, <a href="http://www.research.att.com/~njas/sequences/b141805.txt">Table of n, a(n) for n = 1..24834</a>
<a href="http://www.research.att.com/~njas/sequences/Sindx_Su.html#ssq">Index to sequences related to sums of squares and sums of cubes</a>
9 is the sum of two distinct nonzero cubes in exactly one way: 9 = 1^3 + 2^3. 9 is not in A031980 because 1 and 2 are earlier terms of A031980. Therefore 9 is a term of this sequence.
1729 is the sum of two distinct nonzero cubes in exactly two ways: 1729 = 9^3 + 10^3 = 1^3 + 12^3. 1729 is not in A031980 because 1 and 12 are earlier terms of A031980. Therefore 1729 is a term of this sequence.
7094269 is the sum of two distinct nonzero cubes in exactly two ways: 7094269 = 70^3 + 189^3 = 133^3 + 168^3. 7094269 is in A031980 because it not the sum of cubes of two earlier terms of A031980; in the first case 189 and in the second case 133 is not a term of A031980. Therefore 7094269 is not a term of this sequence.
(MAGMA) m:=1853; a:=[]; a2:={}; for n in [1..m] do p:=1; u:= a2 join { x: x in a }; while p in u do p:=p+1; end while; if p gt m then break; end if; a2:=a2 join { x^3 + p^3: x in a | x^3 + p^3 le m }; Append(~a, p); end for; print a2;
nonn
Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jul 16 2008
approved