login
Numbers that are the sum of nine fourth powers in exactly four ways.
8

%I #6 Jul 31 2021 21:28:22

%S 2854,2919,2934,2949,2964,3014,3029,3094,3159,3174,3204,3254,3269,

%T 3429,3444,3558,3573,3638,3798,3813,3974,4034,4134,4164,4179,4182,

%U 4209,4214,4274,4294,4389,4439,4454,4534,4614,4644,4709,4773,4788,4838,4884,4918,4949

%N Numbers that are the sum of nine fourth powers in exactly four ways.

%C Differs from A345588 at term 11 because 3189 = 1^4 + 1^4 + 1^4 + 1^4 + 2^4 + 4^4 + 4^4 + 4^4 + 7^4 = 1^4 + 1^4 + 1^4 + 1^4 + 3^4 + 4^4 + 4^4 + 6^4 + 6^4 = 1^4 + 2^4 + 2^4 + 3^4 + 3^4 + 3^4 + 4^4 + 4^4 + 7^4 = 1^4 + 2^4 + 3^4 + 3^4 + 3^4 + 3^4 + 4^4 + 6^4 + 6^4 = 2^4 + 2^4 + 2^4 + 2^4 + 5^4 + 5^4 + 5^4 + 5^4 + 5^4.

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

%e 2919 is a term because 2919 = 1^4 + 1^4 + 1^4 + 1^4 + 1^4 + 1^4 + 4^4 + 4^4 + 7^4 = 1^4 + 1^4 + 1^4 + 2^4 + 3^4 + 3^4 + 3^4 + 4^4 + 7^4 = 1^4 + 1^4 + 1^4 + 3^4 + 3^4 + 3^4 + 3^4 + 6^4 + 6^4 = 2^4 + 2^4 + 3^4 + 3^4 + 3^4 + 3^4 + 3^4 + 3^4 + 7^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, 9):

%o tot = sum(pos)

%o keep[tot] += 1

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

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

%o print(rets[x])

%Y Cf. A345588, A345796, A345836, A345845, A345847, A345856, A346339.

%K nonn

%O 1,1

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