Let
N=2^{4}* 5^{7}.
What is the sum of all N's positive factors?
Generalize.
The factors are all a power of 2 times a power of 5 (including zero power), so
Sigma{i=0 to 4} Sigma {j=0 to 7} (2^i * 5^j)
This comes out to 3027336. It includes 1 and the number itself.
Generalized
Sigma{i=0 to m} Sigma {j=0 to n} (a^i * b^j)
Continue adding c's, d's etc. as well as Sigmas for k, l, etc, for powers o, p, q, etc.
Or was a closed form wanted?
Does the fact that 2 and 5 were chosen imply that there may be a way of finding a closed form based on the fact that 2 and 5 are factors of the base of decimal numbers?
DefDbl AZ
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
part2 = 1
For i = 0 To 4
part5 = 1
For j = 0 To 7
tot = tot + part2 * part5
part5 = part5 * 5
Next
part2 = part2 * 2
Next
Text1.Text = Text1.Text & tot & crlf
Text1.Text = Text1.Text & crlf & " done"
End Sub

Posted by Charlie
on 20180308 12:24:20 