A345793 Numbers that are the sum of nine cubes in exactly one way.
9, 16, 23, 30, 35, 37, 42, 44, 49, 51, 56, 58, 61, 63, 65, 68, 70, 75, 77, 79, 82, 84, 86, 87, 89, 91, 93, 94, 96, 98, 100, 101, 103, 105, 107, 108, 110, 112, 113, 114, 115, 119, 120, 121, 122, 124, 126, 127, 128, 129, 131, 134, 135, 138, 139, 141, 142, 145
Offset: 1
Keywords
Examples
16 is a term because 16 = 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..176
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, 9): 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