I was wondering what is the correct time complexity expressed in terms of big O on this type of loop:
for(i=1;i<=n;i++)
for(int j=1;j*i<=n;j++)
// O(1) code here
The inner loops will make $n + \frac{n}{2} + \frac{n}{3} + \dots + \frac{n}{n}$. I know that this type of formula is $O(n \log n)$, so is this the correct time complexity on this piece of code?