A345825 Numbers that are the sum of seven fourth powers in exactly three ways.
2677, 2692, 2757, 2852, 2867, 2917, 2997, 3107, 3172, 3301, 3476, 3541, 3972, 4132, 4227, 4242, 4257, 4307, 4322, 4372, 4437, 4452, 4482, 4497, 4562, 4627, 4737, 4756, 4851, 4866, 4867, 4931, 4996, 5077, 5106, 5107, 5122, 5187, 5252, 5282, 5317, 5347, 5362
Offset: 1
Keywords
Examples
2692 is a term because 2692 = 1^4 + 1^4 + 1^4 + 2^4 + 2^4 + 4^4 + 7^4 = 1^4 + 1^4 + 1^4 + 2^4 + 3^4 + 6^4 + 6^4 = 2^4 + 2^4 + 2^4 + 3^4 + 3^4 + 3^4 + 7^4.
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**4 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 == 3]) for x in range(len(rets)): print(rets[x])
Comments