The following UBASIC program was interrupted when the total of possible F and G was up to 239,285, and so the solutions found
(2, 3, 4)
(3, 7, 8)
are the only ones where F and G add up to less than 239,285.
list
10 for Tot=1 to 1000000
20 F=2
30 while F<=Tot/2
40 G=Tot-F
50 if prmdiv(G)=G then
60 :Lhs=F*(F+3)+G*(G+3)
70 :Disc=9+4*Lhs
80 :Sr=int(sqrt(Disc)+0.5)
90 :if Sr*Sr=Disc then
100 :H=(Sr-3)/2
110 :if H=int(H) then print F,G,H
115 F=nxtprm(F)
120 wend
130 next Tot
OK
run
2 3 4.0
3 7 8.0
Break in 80
?tot
239285
OK
|
Posted by Charlie
on 2008-04-19 12:55:35 |