Simplifying $\sum_{i=0}^{\log n} \frac{n}{\log\left(\frac{n}{2^i}\right)}$

118 Views Asked by At

$$\sum_{i=0}^{\log n} \frac{n}{\log\left(\frac{n}{2^i}\right)}$$

I'm having trouble seeing how this summation simplifies.

It seems it would be something like:

$$\frac{n}{\log(n)} + \frac{n}{\log\left(\frac{n}{2}\right)} + \frac{n}{\log\left(\frac{n}{4}\right)} + \frac{n}{\log\left(\frac{n}{8}\right)} + \cdots +\frac{n}{\log\left(\frac{n}{2^{\log(n)}}\right)}$$

Somehow this sum $\in O(n\log(\log n))$, and I'm not sure why. Can anyone help me understand?