A345803 Numbers that are the sum of ten cubes in exactly one ways.
10, 17, 24, 31, 36, 38, 43, 45, 50, 52, 57, 59, 62, 64, 66, 69, 71, 76, 78, 83, 85, 87, 88, 90, 92, 94, 95, 97, 101, 102, 104, 106, 108, 109, 111, 113, 114, 115, 116, 118, 120, 121, 122, 123, 125, 127, 128, 129, 130, 132, 135, 137, 139, 140, 142, 143, 146
Offset: 1
Keywords
Examples
17 is a term because 17 = 1^3 + 1^3 + 1^3 + 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..151
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 == 1]) for x in range(len(rets)): print(rets[x])
Comments