How do we get a closed form formula for the series sum: $$\large \frac{1}{\log_2\left(\frac{n}{2^0} \right )} + \frac{1}{\log_2\left(\frac{n}{2^1} \right )} + \frac{1}{\log_2\left(\frac{n}{2^2} \right )} + \dots + \frac{1}{\log_2\left(\frac{n}{2^{\log_2(n)-1}} \right )}$$
My teacher has told me that it will be simplified to: $$\large \sum_{i=1}^{\log_2(n)-1}\frac{1}{i} = \mathcal{O}\left(\log_2\log_2 n \right )$$
I have no clue how this could happen.
Use the change of index $i=\left(\log_2n\right)-1-k$ to get $$ \sum_{k=0}^{\log_2(n)-1}\frac{1}{\log_2\left(\frac{n}{2^k} \right )}=\sum_{i=0}^{\left(\log_2n\right)-1}\frac{1}{\log_2\left(n2^{i-\log_2(n)+1} \right )} . $$ Now, note that $$\log_2\left(n2^{i-\log_2(n)+1} \right ) =\log_2\left(n\right)-\log_2\left(2^{\log_2n} \right) +\log_2\left(2^{i+1}\right) =i+1,$$ hence $$\sum_{k=0}^{\log_2(n)-1}\frac{1}{\log_2\left(\frac{n}{2^k} \right )}=\sum_{i=0}^{\left(\log_2n\right)-1}\frac{1}{i+1},$$ which is the wanted formula, up to the change of index $j=i+1$.