A345804 Numbers that are the sum of ten cubes in exactly two ways.
73, 80, 99, 134, 136, 141, 148, 155, 160, 162, 167, 169, 174, 176, 183, 186, 188, 190, 192, 193, 195, 199, 202, 204, 206, 209, 211, 212, 213, 214, 216, 218, 221, 223, 228, 230, 235, 240, 244, 247, 249, 254, 262, 266, 269, 270, 273, 274, 290, 292, 297, 304
Offset: 1
Keywords
Examples
80 is a term because 80 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 2^3 + 3^3 = 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 2^3 + 2^3.
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..90
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 == 2]) for x in range(len(rets)): print(rets[x])
Comments