(In reply to
computer solution by Charlie)
If the result could be a rational, rather than an integer, we get:
5 MinVal=9999999999999:MaxVal=0
10 D$="123456789":H$=D$
20 loop
40 Tval=0
50 for I=1 to 7 step 3
60 Term=(val(mid(D$,I,1))//val(mid(D$,I+1,1)))^val(mid(D$,I+2,1))
70 Tval=Tval+Term
80 next
90 if Tval<MinVal then MinVal=Tval:MinStr=D$
100 if Tval>MaxVal then MaxVal=Tval:MaxStr=D$
110
390 gosub *Permute(&D$)
398 if D$=H$ then goto 400
399 endloop
400 print MinStr,MinVal,MinVal/1.0
410 print MaxStr,MaxVal,MaxVal/1.0
700 end
giving (after manual reformatting):
(3/9)^7 + (2/5)^8 + (1/4)^6 = 4747532587/3499200000000 ~= 0.0013567479958276177
(8/1)^9 + (6/2)^7 + (5/3)^4 = 10871813740/81 ~= 134,219,922.7160493827160493827
The maximum is not much larger, due to most of it coming from the (8/1)^9.
Edited on February 9, 2009, 1:02 pm
|
Posted by Charlie
on 2009-02-09 13:01:14 |