DEFDBL A-Z
l2 = LOG(2) / LOG(10)
l5 = LOG(5) / LOG(10)
FOR m = 2 TO 20
sum = 0
FOR p2 = 0 TO m
FOR p5 = 0 TO m
sum = sum + p2 * l2 + p5 * l5
NEXT
NEXT
PRINT m, sum
_clipboard$= _clipboard$+str$(m)+" "+str$(sum)+chr$(13)+chr$(10)
NEXT
finds for different M:
M sum of logs of divisors
2 9
3 24
4 50
5 90
6 147
7 224
8 323.9999999999998
9 449.9999999999995
10 604.9999999999992
11 791.9999999999988
12 1013.999999999998
13 1273.999999999998
14 1574.999999999998
15 1919.999999999997
16 2311.999999999997
17 2753.999999999996
18 3248.999999999996
19 3799.999999999996
20 4409.999999999995
The larger amounts have rounding errors, but the sought value of M is 11.
|
Posted by Charlie
on 2014-08-01 12:36:02 |