A short program finds: 3751
If r and s are nonnegative integers that do not exceed N, where N is {0, 1, 2, 3, ... } the sum is the sequence
{1, 12, 91, 600, 3751, 22932, 138811, ... }
which is in Sloane's as A160869 a(n) = sigma(6^(n-1)).
Although I cannot make the formula given by sigma(6^(n-1)) match the results, which should not be surprising since it is a different formula than the one used in this problem.
-------------------
top = 5
total = 0
for r in range(top):
for s in range(top):
total += 2**r*3**s
print(total)
for top in range(1,8):
total = 0
for r in range(top):
for s in range(top):
total += 2**r*3**s
print(top-1,total)
|
Posted by Larry
on 2024-11-15 09:18:48 |