Find the three smallest positive integers (with the second number exceeding the first) such that the sum of the squares of the first two numbers is equal to the cube of the third number while the sum of the cubes of the first two numbers is equal to nine times the fourth power of the third number.
The below program was halted at a total of 24576 for the first two numbers, so the shown solution (625, 1250, 125) and pseudosolution (1458, 1458, 162, where B does not exceed A) are the only two that exist for the total of the first two to be less than 24,576.
list
10 for T=1 to 1000000
20 for A=1 to int(T/2)
30 B=T-A
40 Cc=A*A+B*B
50 C=int(Cc^(1/3)+0.5)
60 if C*C*C=Cc then
70 :if A*A*A+B*B*B=9*Cc*C then
80 :print A,B,C
90 next A
100 next T
OK
run
625 1250 125
1458 1458 162
Break in 50
asave "cubbiq"
OK
cont
Break in 50
?t
7965
OK
cont
Break in 50
?t
12650
OK
cont
Break in 50
?t
24576
OK
|
Posted by Charlie
on 2006-06-18 13:22:25 |