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.

A141805 Complement of A031980.

This page as a plain text file.
%I A141805 #13 Feb 10 2025 03:11:53
%S A141805 9,28,35,65,72,91,126,133,152,189,217,224,243,280,341,344,351,370,407,
%T A141805 468,513,520,539,559,576,637,728,855,1001,1008,1027,1064,1125,1216,
%U A141805 1332,1339,1343,1358,1395,1456,1512,1547,1674,1729,1736,1755,1792,1843,1853
%N A141805 Complement of A031980.
%C A141805 Subsequence of A024670; A141806 gives the terms of A024670 that are not in this sequence.
%C A141805 Not a supersequence of A001235; 7094269 is the smallest number that is in A001235 but not in this sequence (see third example below), the next number is 11261376.
%H A141805 Klaus Brockhaus, <a href="/A141805/b141805.txt">Table of n, a(n) for n = 1..24834</a>
%H A141805 <a href="/index/Su#ssq">Index to sequences related to sums of squares and sums of cubes</a>
%e A141805 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.
%e A141805 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.
%e A141805 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 is 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.
%t A141805 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 *)
%o A141805 (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;
%Y A141805 Cf. A141806, A031980 (smallest number not occurring earlier and not the sum of cubes of two distinct earlier terms), A024670 (sums of cubes of two distinct positive integers), A001235 (sums of two cubes in more than one way).
%K A141805 nonn
%O A141805 1,1
%A A141805 _Klaus Brockhaus_, Jul 16 2008