login
A345534
Numbers that are the sum of eight cubes in four or more ways.
8
256, 347, 382, 401, 408, 427, 434, 438, 445, 464, 471, 478, 480, 490, 497, 499, 502, 504, 506, 511, 516, 523, 530, 532, 534, 537, 560, 565, 567, 569, 571, 578, 586, 593, 595, 597, 600, 602, 604, 605, 611, 612, 616, 619, 621, 623, 624, 626, 628, 630, 635, 642
OFFSET
1,1
LINKS
EXAMPLE
347 is a term because 347 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 4^3 + 5^3 = 1^3 + 1^3 + 1^3 + 3^3 + 3^3 + 3^3 + 3^3 + 4^3 = 1^3 + 2^3 + 2^3 + 2^3 + 2^3 + 3^3 + 4^3 + 4^3 = 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 3^3 + 3^3 + 5^3.
PROG
(Python)
from itertools import combinations_with_replacement as cwr
from collections import defaultdict
keep = defaultdict(lambda: 0)
power_terms = [x**3 for x in range(1, 1000)]
for pos in cwr(power_terms, 8):
tot = sum(pos)
keep[tot] += 1
rets = sorted([k for k, v in keep.items() if v >= 4])
for x in range(len(rets)):
print(rets[x])
KEYWORD
nonn
AUTHOR
STATUS
approved