[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A345511
Numbers that are the sum of six cubes in two or more ways.
7
158, 165, 184, 221, 228, 235, 247, 254, 256, 261, 268, 273, 275, 280, 282, 284, 287, 291, 294, 306, 310, 313, 317, 324, 331, 332, 343, 345, 347, 350, 352, 362, 369, 371, 373, 376, 378, 380, 385, 387, 388, 392, 395, 399, 404, 406, 408, 411, 418, 425, 430, 432
OFFSET
1,1
LINKS
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, 6):
tot = sum(pos)
keep[tot] += 1
rets = sorted([k for k, v in keep.items() if v >= 2])
for x in range(len(rets)):
print(rets[x])
KEYWORD
nonn
AUTHOR
STATUS
approved