This is from Hardy and Wright’s An Introduction to the Theory of Numbers, Section 18.2. "The average order of $d(n)$". Here, $d(n)$ denotes the number of divisors of $n$. The section states that using some theorems of Ramanujan, the sum $$d^2(1)+...+d^2(n)$$ is of order $n(\log n)^{2^2-1}=n(\log n)^3$ and the sum $$d^3(1)+...+d^3(n)$$ is of order $n(\log n)^{2^3-1}=n(\log n)^7$, and so on.
It's not clear to me exactly what "is of order" means. What exactly are the theorems they are referring to?
I'm wondering more specifically if given a positive integer $k$, there is a constant $a_k$ such that $$\frac{d^k(1)+...+d^k(n)}{n(\log n)^{2^k-1}}$$ converges to $a_k$ as $n$ goes to infinity. If so, what is the constant $a_k$? I think the answer from @marko-reidel to this question variance of number of divisors has the answer for $k=2$, and I can somewhat follow the steps for that case. But, I do not see how to generalize it for $k>2$. Does anyone know what Ramanujan's theorems say about this or are there any publications that would have the answer? If it can be explained in an undergraduate level, that would be great.



