A345777 Numbers that are the sum of seven cubes in exactly five ways.
627, 768, 838, 845, 857, 864, 874, 881, 894, 900, 920, 937, 950, 962, 976, 981, 983, 990, 1002, 1009, 1011, 1016, 1027, 1054, 1060, 1061, 1063, 1089, 1096, 1098, 1102, 1105, 1109, 1115, 1124, 1128, 1133, 1135, 1137, 1140, 1144, 1151, 1153, 1154, 1159, 1163
Offset: 1
Keywords
Examples
768 is a term because 768 = 1^3 + 1^3 + 1^3 + 1^3 + 2^3 + 3^3 + 8^3 = 1^3 + 1^3 + 1^3 + 3^3 + 3^3 + 4^3 + 7^3 = 1^3 + 1^3 + 2^3 + 2^3 + 3^3 + 6^3 + 6^3 = 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 5^3 + 7^3 = 3^3 + 3^3 + 3^3 + 3^3 + 3^3 + 5^3 + 6^3.
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..351
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, 7): tot = sum(pos) keep[tot] += 1 rets = sorted([k for k, v in keep.items() if v == 5]) for x in range(len(rets)): print(rets[x])
Comments