login
Numbers that are the sum of seven cubes in three or more ways.
8

%I #7 Aug 05 2021 15:22:18

%S 222,229,248,255,262,281,283,285,318,346,370,374,377,379,381,396,400,

%T 407,412,419,426,433,437,438,444,451,463,470,472,475,477,489,494,496,

%U 501,503,505,507,510,522,529,533,536,559,564,566,568,570,577,578,584,585

%N Numbers that are the sum of seven cubes in three or more ways.

%H Sean A. Irvine, <a href="/A345521/b345521.txt">Table of n, a(n) for n = 1..10000</a>

%e 229 is a term because 229 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 2^3 + 5^3 = 1^3 + 1^3 + 2^3 + 3^3 + 3^3 + 3^3 + 3^3 = 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 3^3 + 4^3.

%o (Python)

%o from itertools import combinations_with_replacement as cwr

%o from collections import defaultdict

%o keep = defaultdict(lambda: 0)

%o power_terms = [x**3 for x in range(1, 1000)]

%o for pos in cwr(power_terms, 7):

%o tot = sum(pos)

%o keep[tot] += 1

%o rets = sorted([k for k, v in keep.items() if v >= 3])

%o for x in range(len(rets)):

%o print(rets[x])

%Y Cf. A345480, A345512, A345520, A345522, A345533, A345569, A345775.

%K nonn

%O 1,1

%A _David Consiglio, Jr._, Jun 20 2021