%I #6 Aug 05 2021 15:20:46
%S 223,230,237,249,256,263,270,275,282,284,286,289,291,293,308,310,312,
%T 319,326,345,347,349,354,364,371,373,375,378,380,382,385,386,387,389,
%U 397,399,401,404,406,408,410,412,413,415,420,423,427,434,438,439,441,443
%N Numbers that are the sum of eight cubes in three or more ways.
%H Sean A. Irvine, <a href="/A345533/b345533.txt">Table of n, a(n) for n = 1..10000</a>
%e 230 is a term because 230 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 2^3 + 5^3 = 1^3 + 1^3 + 1^3 + 2^3 + 3^3 + 3^3 + 3^3 + 3^3 = 1^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, 8):
%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. A345490, A345521, A345532, A345534, A345542, A345578, A345785.
%K nonn
%O 1,1
%A _David Consiglio, Jr._, Jun 20 2021
|