%I #27 Sep 26 2020 15:04:06
%S 60,120,240,432,960,360,3840,1728,2592,720,1800,2520,161700,1440,6840,
%T 9000,2160,2880,168300,5040,41472,5760,1520820,4320,7200,11520,119700,
%U 10080,682080,10800,8640,14400,27360,12960,373248,20160,61560,17280,28800,55440,171000,21600
%N Least k whose set of divisors contains exactly n quadruples (x, y, z, w) such that x^3 + y^3 + z^3 = w^3, or 0 if no such k exists.
%C Observation: a(n) == 0 (mod 12).
%C Listing primitive tuples (w, x, y, z) enables to compute for some m how many such tuples are in its divisors using the lcm of such tuples. - _David A. Corneth_, Sep 26 2020
%D Y. Perelman, Solutions to x^3 + y^3 + z^3 = u^3, Mathematics can be Fun, pp. 316-9 Mir Moscow 1985.
%H David A. Corneth, <a href="/A337098/b337098.txt">Table of n, a(n) for n = 1..504</a>
%H Fred Richman, <a href="http://math.fau.edu/Richman/cubes.htm">Sums of Three Cubes</a>
%e a(3) = 240 because the set of the divisors {1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 40, 48, 60, 80, 120, 240} contains 3 quadruples {3, 4, 5, 6}, {6, 8, 10, 12} and {12, 16, 20, 24}. The first quadruple is primitive.
%p with(numtheory):divisors(240);
%p for n from 1 to 52 do :
%p ii:=0:
%p for q from 6 by 6 to 10^8 while(ii=0) do:
%p d:=divisors(q):n0:=nops(d):it:=0:
%p for i from 1 to n0-3 do:
%p for j from i+1 to n0-2 do :
%p for k from j+1 to n0-1 do:
%p for m from k+1 to n0 do:
%p if d[i]^3 + d[j]^3 + d[k]^3 = d[m]^3
%p then
%p it:=it+1:
%p else
%p fi:
%p od:
%p od:
%p od:
%p od:
%p if it = n
%p then
%p ii:=1: printf (`%d %d \n`,n,q):
%p else
%p fi:
%p od:
%p od:
%t With[{s = Array[Count[Subsets[Divisors[#], {4}]^3, _?(#1 + #2 + #3 == #4 & @@ # &)] &, 10^4]}, Rest@ Values[#][[1 ;; 1 + LengthWhile[Differences@ Keys@ #, # == 1 &] ]] &@ KeySort@ PositionIndex[s][[All, 1]]] (* _Michael De Vlieger_, Sep 18 2020 *)
%o (Python)
%o from itertools import combinations
%o from sympy import divisors
%o def A337098(n):
%o k = 1
%o while True:
%o if n == sum(1 for x in combinations((d**3 for d in divisors(k)),4) if sum(x[:-1]) == x[-1]):
%o return k
%o k += 1 # _Chai Wah Wu_, Sep 25 2020
%Y Cf. A027750, A095868, A095867, A096545, A096546, A328204, A328149, A331365.
%K nonn,hard
%O 1,1
%A _Michel Lagneau_, Aug 15 2020
%E a(13)-a(22) from _Chai Wah Wu_, Sep 25 2020
%E More terms from _David A. Corneth_, Sep 26 2020