login
Numbers that are the sum of eight fourth powers in exactly two ways.
8

%I #6 Jul 31 2021 21:33:27

%S 263,278,293,308,323,343,358,373,388,423,438,453,503,533,548,563,583,

%T 598,613,628,678,693,758,773,788,803,853,868,887,902,917,932,933,967,

%U 982,997,1028,1043,1047,1062,1108,1127,1142,1157,1172,1222,1237,1283,1302

%N Numbers that are the sum of eight fourth powers in exactly two ways.

%C Differs from A345577 at term 14 because 518 = 1^4 + 1^4 + 1^4 + 1^4 + 1^4 + 1^4 + 4^4 + 4^4 = 1^4 + 1^4 + 1^4 + 2^4 + 3^4 + 3^4 + 3^4 + 4^4 = 2^4 + 2^4 + 3^4 + 3^4 + 3^4 + 3^4 + 3^4 + 3^4.

%H Sean A. Irvine, <a href="/A345834/b345834.txt">Table of n, a(n) for n = 1..10000</a>

%e 278 is a term because 278 = 1^4 + 1^4 + 1^4 + 1^4 + 1^4 + 1^4 + 2^4 + 4^4 = 1^4 + 1^4 + 1^4 + 2^4 + 2^4 + 3^4 + 3^4 + 3^4.

%o (Python)

%o from itertools import combinations_with_replacement as cwr

%o from collections import defaultdict

%o keep = defaultdict(lambda: 0)

%o power_terms = [x**4 for x in range(1, 1000)]

%o for pos in cwr(power_terms, 8):

%o tot = sum(pos)

%o keep[tot] += 1

%o rets = sorted([k for k, v in keep.items() if v == 2])

%o for x in range(len(rets)):

%o print(rets[x])

%Y Cf. A345577, A345784, A345824, A345833, A345835, A345844, A346327.

%K nonn

%O 1,1

%A _David Consiglio, Jr._, Jun 26 2021