A345773 Numbers that are the sum of seven cubes in exactly one way.
7, 14, 21, 28, 33, 35, 40, 42, 47, 49, 54, 56, 59, 61, 66, 68, 70, 73, 75, 77, 80, 84, 85, 87, 91, 92, 94, 96, 98, 99, 103, 105, 106, 110, 111, 112, 113, 117, 118, 122, 124, 125, 129, 132, 133, 136, 137, 138, 140, 143, 144, 145, 147, 148, 150, 151, 152, 154
Offset: 1
Keywords
Examples
14 is a term because 14 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 2^3.
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..324
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 == 1]) for x in range(len(rets)): print(rets[x])
Comments