Calculating double sum

2.8k Views Asked by At

How do I calculate this sum (as a function of n)?
https://i.stack.imgur.com/Hm9mC.png

I have no experience in calculating sums like these, so I don't know any of the rules regarding this subject.

2

There are 2 best solutions below

1
On

This really seems like an expression that would be better calculated by a computer than by hand. It can be done in Python with two for loops.


import math
sum = 0
for i in range (0, n+1):
    for j in range (0, i+1):
        sum = sum + (i * j) * math.log(i * j)
0
On

Beside the brute force, you could write $$S_n=\sum_{i=1}^n\sum_{j=1}^i i j \log(ij)=\sum_{i=1}^n i \log(i) \sum_{j=1}^i j+\sum_{i=1}^n i\sum_{j=1}^i j\log(j)$$ Thie most inner sums can be computed $$\sum_{j=1}^i j=\frac{1}{2} i (i+1)$$ $$\sum_{j=1}^i j\log(j)=\log (H(i))$$ where appears the hyperfactorial function.

So, by the end $$S_n=\frac 12\sum_{i=1}^n \left(2 i \log (H(i))+i^3 \log (i)+i^2 \log (i) \right)$$ I do not think that we could simplify further.