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.

A338667 Numbers that are the sum of two positive cubes in exactly one way.

This page as a plain text file.
%I A338667 #26 Jul 31 2021 23:46:35
%S A338667 2,9,16,28,35,54,65,72,91,126,128,133,152,189,217,224,243,250,280,341,
%T A338667 344,351,370,407,432,468,513,520,539,559,576,637,686,728,730,737,756,
%U A338667 793,854,855,945,1001,1008,1024,1027,1064,1072,1125,1216,1241,1332,1339,1343,1358,1395,1456,1458,1512,1547,1674,1736
%N A338667 Numbers that are the sum of two positive cubes in exactly one way.
%C A338667 This sequence differs from A003325 at term 61: A003325(61) = 1729 is the famous Ramanujan taxicab number and is excluded from this sequence because it is the sum of two cubes in two distinct ways.
%H A338667 David Consiglio, Jr., <a href="/A338667/b338667.txt">Table of n, a(n) for n = 1..20000</a>
%e A338667 35 is a term of this sequence because 2^3 + 3^3 = 8 + 27 = 35 and this is the one and only way to express 35 as the sum of two cubes.
%t A338667 Select[Range@2000,Length[s=PowersRepresentations[#,2,3]]==1&&And@@(#>0&@@@s)&] (* _Giorgos Kalogeropoulos_, Apr 24 2021 *)
%o A338667 (Python)
%o A338667 from itertools import combinations_with_replacement as cwr
%o A338667 from collections import defaultdict
%o A338667 from bisect import bisect_left as bisect
%o A338667 keep = defaultdict(lambda: 0)
%o A338667 power_terms = [x**3 for x in range(1,1000)]
%o A338667 for pos in cwr(power_terms,2):
%o A338667     tot = sum(pos)
%o A338667     keep[tot] += 1
%o A338667 rets = sorted([k for k,v in keep.items() if v == 1])
%o A338667 for x in range(len(rets)):
%o A338667     print(rets[x])
%Y A338667 Cf. A003325, A025284, A025395, A343708, A344187.
%K A338667 nonn,easy
%O A338667 1,1
%A A338667 _David Consiglio, Jr._, Apr 22 2021