%I #20 Feb 10 2023 11:53:12
%S 134,153,216,225,244,251,288,342,368,405,408,415,528,532,540,577,645,
%T 729,750,755,764,855,863,882,918,919,946,972,980,1065,1072,1080,1126,
%U 1224,1250,1333,1351,1422,1457,1464,1466,1520,1539,1548,1581,1611,1701,1728
%N Numbers m such that m^k is the sum of three positive cubes for all positive integers k.
%C Cubes in this sequence are 216, 729, 1728, 5832, 6859, ...
%C If m, m^2 and m^3 are sums of three positive cubes, then m is in the sequence, because if m^k = a^3 + b^3 + c^3, m^(3+k) = (m*a)^3 + (m*b)^3 + (m*c)^3. - _Robert Israel_, Jul 02 2019
%e 134 is a term because 134 = 1^3 + 2^3 + 5^3, 134^2 = 10^3 + 11^3 + 25^3, 134^3 = 44^3 + 102^3 + 108^3, 134^4 = 134^3 + (2*134)^3 + (5*134)^3, 134^5 = 1340^3 + (11*134)^3 + (25*134)^3, ...
%p A3072:= proc(n) local a,b,c;
%p for a from 1 while 3*a^3<=n do
%p for b from a while a^3 + 2*b^3 <= n do
%p c:= floor((n-a^3-b^3)^(1/3));
%p if a^3+b^3+c^3=n then return true fi;
%p od od;
%p false
%p end proc:
%p filter:= n -> A3072(n) and A3072(n^2) and A3072(n^3):
%p select(filter, [$1..2000]); # _Robert Israel_, Jul 02 2019
%t A3072[n_] := Module[{a, b, c}, For[a = 1, 3 a^3 <= n, a++, For[b = a, a^3 + 2 b^3 <= n, b++, c = Floor[(n - a^3 - b^3)^(1/3)]; If[a^3 + b^3 + c^3 == n, Return[ True]]]]; False];
%t okQ[n_] := If[A3072[n] && A3072[n^2] && A3072[n^3], Print[n]; True, False];
%t Select[Range[2000], okQ] (* _Jean-François Alcover_, Feb 10 2023, after _Robert Israel_ *)
%Y Cf. A003072.
%K nonn
%O 1,1
%A _Altug Alkan_, Jun 10 2016
|