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.

Original entry on oeis.org

2, 9, 16, 28, 35, 54, 65, 72, 91, 126, 128, 133, 152, 189, 217, 224, 243, 250, 280, 341, 344, 351, 370, 407, 432, 468, 513, 520, 539, 559, 576, 637, 686, 728, 730, 737, 756, 793, 854, 855, 945, 1001, 1008, 1024, 1027, 1064, 1072, 1125, 1216, 1241, 1332, 1339, 1343, 1358, 1395, 1456, 1458, 1512, 1547, 1674, 1736
Offset: 1

Views

Author

David Consiglio, Jr., Apr 22 2021

Keywords

Comments

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.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@2000,Length[s=PowersRepresentations[#,2,3]]==1&&And@@(#>0&@@@s)&] (* Giorgos Kalogeropoulos, Apr 24 2021 *)
  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    from bisect import bisect_left as bisect
    keep = defaultdict(lambda: 0)
    power_terms = [x**3 for x in range(1,1000)]
    for pos in cwr(power_terms,2):
        tot = sum(pos)
        keep[tot] += 1
    rets = sorted([k for k,v in keep.items() if v == 1])
    for x in range(len(rets)):
        print(rets[x])