for tot=3:10000
for x=1:floor(tot/2)
y=tot-x;
cubes=x^3+y^3;
sr=round(sqrt(cubes));
if sr*sr==cubes
fourths=x^4+y^4;
cr=round(fourths^(1/3));
if cr^3==fourths
fprintf('%5d %5d %12d %7d %20d %5d
',x,y,cubes,sr,fourths,cr)
end
end
end
end
finds
x y sum of square sum of cube
cubes root fourth powers root
32 32 65536 256 2097152 128
289 578 217238121 14739 118587876497 4913
2048 2048 17179869184 131072 35184372088832 32768
In the first case x and y are not distinct, so that the minimum x+y is 289 + 578 = 867.
Edited on February 2, 2022, 11:26 am
|
Posted by Charlie
on 2022-02-02 11:23:58 |