Author: Benjamin Qi
Our goal is to compute the summation ∑i=1n⌊ni⌋⋅i\sum_{i=1}^n\left\lfloor \frac{n}{i}\right\rfloor\cdot i∑i=1n⌊in⌋⋅i in faster than Θ(n)\Theta(n)Θ(n) time.
Hint
Solution