UBASIC has the necessary precision to do this:
10 for P=1 to 100
20 for Q=1 to 100
30 V=cutspc(str(P^Q))
40 T=0:Ct=0
50 for I=1 to len(V)
60 T=T+val(mid(V,I,1)):Ct=Ct+1
70 next
80 if T>=Max then
90 :print P;Q,V;T:Max=T
95 :print Ct;T/Ct
100 next
110 next
finds that the maximum SOD(p^q) is 99^95, whose 190 digits total 972, beating out the next largest, 94^98, whose greater number of digits (194) total only 970, as the average digit in the maximum SOD is 5.11579, vs the runner-up's 5.
94 ^ 98 = 2325571265870981054156130433083369995987150699861246479853313067
03776949993251588965917772109867956848511077254540681882888225677649126945218740
79483339544658453938914789983271676836345351766016, SOD = 970
# of digits = 194; avg digit = 5.0
99 ^ 95 = 3848960788934848611927795802824596789608451156087366034658627953
53014812600853425803226738376862748709461096855428669269737472672585319565767946
0590239636893953692985541958490801973870359499, SOD = 972
# of digits = 190; avg digit = 5.1157894736842105263
|
Posted by Charlie
on 2009-07-21 17:51:13 |