Each of A, B and C is a positive integer, with A less than B, that satisfies this equation:
A3+B3=19C3
Determine all triplets (A,B,C) with A+B+C under 100,000
*** As an extra challenge only, solve this puzzle without using a computer program/spreadsheet aided method.
clearvars,clc
sets=[];
fid=fopen('c:\vb5 projects\flooble\cubic diophantine II.txt','w');
ct=0;
for a=1:50000
for b=a+1:100000-a
tst=(a^3+b^3)/19;
c=round(tst^(1/3));
if a+b+c>=100000
break
end
if c^3==tst
newset=[a b];
good=true;
for i=1:size(sets,1)
q=unique(newset./sets(i,:));
if length(q)==1
if q==round(q)
good=false;
end
end
end
if good
fprintf(fid,'%8d %8d %8d\n',a,b,c);
fprintf('%8d %8d %8d\n',a,b,c);
sets=[sets; newset];
ct=ct+1;
end
end
end
end
fclose(fid);
finds all such sets where a+b+c < 100,000, but report only those sets that are not integral multiples of a previously reported set.
These were the only fundamental sets. All others were integral multiples of one of these; any such multiple will work:
a b c
1 8 3 accounts for floor(100000/(1+8+3)) = 8333 solutions
3 5 2 accounts for 10000-1 = 9999 solutions
as 30000 + 50000 + 20000 is not under 100000
33 92 35 accounts for 625 - 1 = 624 solutions, same reasoning
9613 27323 10386 accounts for 2 solutions below a+b+c = 100000
That's a total of 18958 solutions, counting the integral multiples.
|
Posted by Charlie
on 2022-08-13 11:41:12 |