A345806 Numbers that are the sum of ten cubes in exactly four ways.
225, 232, 251, 258, 265, 272, 284, 286, 291, 307, 310, 314, 321, 323, 328, 342, 347, 356, 363, 366, 373, 375, 377, 380, 389, 391, 398, 399, 405, 412, 419, 422, 424, 427, 434, 438, 441, 445, 450, 451, 458, 459, 461, 464, 469, 471, 476, 478, 481, 484, 488, 489
Offset: 1
Keywords
Examples
232 is a term because 232 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 2^3 + 5^3 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 2^3 + 3^3 + 3^3 + 3^3 + 3^3 = 1^3 + 1^3 + 1^3 + 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 3^3 + 4^3 = 2^3 + 2^3 + 3^3 + 3^3 + 3^3 + 3^3 + 3^3 + 3^3 + 3^3 + 3^3.
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..93
Programs
-
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, 10): 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])
Comments