A345791 Numbers that are the sum of eight cubes in exactly nine ways.
984, 1080, 1136, 1171, 1192, 1197, 1204, 1223, 1269, 1273, 1280, 1306, 1318, 1325, 1332, 1333, 1337, 1344, 1356, 1360, 1369, 1370, 1374, 1377, 1379, 1404, 1406, 1415, 1416, 1422, 1425, 1430, 1432, 1438, 1442, 1444, 1445, 1456, 1476, 1481, 1486, 1488, 1494
Offset: 1
Keywords
Examples
1080 is a term because 1080 = 1^3 + 1^3 + 1^3 + 2^3 + 4^3 + 5^3 + 5^3 + 7^3 = 1^3 + 1^3 + 2^3 + 2^3 + 2^3 + 3^3 + 3^3 + 9^3 = 1^3 + 1^3 + 2^3 + 3^3 + 3^3 + 4^3 + 4^3 + 8^3 = 1^3 + 2^3 + 2^3 + 3^3 + 3^3 + 3^3 + 5^3 + 8^3 = 1^3 + 3^3 + 3^3 + 4^3 + 4^3 + 5^3 + 5^3 + 6^3 = 1^3 + 3^3 + 3^3 + 3^3 + 4^3 + 4^3 + 4^3 + 7^3 = 2^3 + 2^3 + 3^3 + 3^3 + 4^3 + 4^3 + 6^3 + 6^3 = 2^3 + 3^3 + 3^3 + 3^3 + 5^3 + 5^3 + 5^3 + 6^3 = 2^3 + 3^3 + 3^3 + 3^3 + 3^3 + 4^3 + 5^3 + 7^3.
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..146
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, 8): tot = sum(pos) keep[tot] += 1 rets = sorted([k for k, v in keep.items() if v == 9]) for x in range(len(rets)): print(rets[x])
Comments