A345523 Numbers that are the sum of seven cubes in five or more ways.
627, 768, 838, 845, 857, 864, 874, 881, 894, 900, 920, 937, 950, 955, 962, 969, 976, 981, 983, 990, 1002, 1009, 1011, 1016, 1027, 1046, 1053, 1054, 1060, 1061, 1063, 1072, 1079, 1089, 1096, 1098, 1102, 1105, 1107, 1109, 1115, 1117, 1121, 1124, 1128, 1133
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..10000
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])