# Asymptotic formula of $\sum_{n \le x} \frac{d(n)}{n^a}$

As the title says, I'm trying to prove $$\sum_{n \le x} \frac{d(n)}{n^a}= \frac{x^{1-a} \log x}{1-a} + \zeta(a)^2+O(x^{1-a}),$$ for $x \ge 2$ and $a>0,a \ne 1$, where $d(n)$ is the number of divisors of $n$. There is a post here dealing with the case $a=1$. This is what I have done so far: \begin{align*} \sum_{n \le x} \frac{d(n)}{n^a} &= \sum_{n \le x} \frac{1}{n^a} \sum_{d \mid n} 1 = \sum_{d \le x} \sum_{\substack{n \le x \\ d \mid n}} \frac{1}{n^a} = \sum_{d \le x} \sum_{q \le x/d } \frac{1}{(qd)^a} = \sum_{d \le x} \frac{1}{d^a} \sum_{q \le x/d} \frac{1}{q^a} \\ &= \sum_{d \le x} \frac{1}{d^a} \left( \frac{(x/d)^{1-a}}{1-a} + \zeta(a) + O((x/d)^{-a}) \right) \\ &= \sum_{d \le x} \left( \frac{x^{1-a}}{d(1-a)} + \frac{\zeta(a)}{d^a} \right) + O(x^{1-a}), \end{align*} from here things start to go out of hand... I've tried using the relevant formulas from this page, but I can't get it to "fit". Any help would be appreciated.

-
If you know complex analysis, try to use Perron's formula for the function $\zeta (s)^2$. –  Soarer Nov 5 '11 at 15:53
@Soarer: I haven't studied complex analysis... –  Carolus Nov 5 '11 at 16:09

What you're trying to show isn't true. You should have $\zeta(a)^2$ rather than $\zeta(a)$. (See Exercise 3.3 in Apostol's number theory book in the link above.)
\begin{align} &\sum_{d \le x} \left( \frac{x^{1-a}}{d(1-a)} + \frac{\zeta(a)}{d^a} \right) + O\left(x^{1-a}\right) \\ &= \frac{x^{1-a}}{1-a} \sum_{d \le x} \frac{1}{d} + \zeta(a) \sum_{d \le x}\frac{1}{d^a} + O\left(x^{1-a}\right) \\ &= \frac{x^{1-a}}{1-a} \Big(\log x + O(1)\Big) + \zeta(a) \left(\frac{x^{1-a}}{1-a} + \zeta(a) + O(x^{-a})\right) + O\left(x^{1-a}\right) \\ &= \frac{x^{1-a} \log x}{1-a} + \zeta(a)^2 + O\left(x^{1-a}\right). \\ \end{align}
Thanks! And, yes, that was a typo. By the way, I haven't studied any analysis and I can't say I really understand this asymptotic stuff/big Oh just yet. Could you please explain to me the following: 1) Why is $(\log x+O(1))$ equivalent to $(\log x+\gamma+O(\log x/x))$ - is it because the $O$-term now "includes" the $\gamma$? 2) How come the term $(x^{1-a} \zeta(a))/(1-a)$ disappear? As I said, I'm very much a beginner, so sorry if I'm asking really stupid questions! Thanks for the help. –  Carolus Nov 6 '11 at 5:40
@Carolus: 1) They aren't equivalent. An expression that is $\log x + \gamma + O(\log x/x)$ is also $\log x + O(1)$ (which is the direction I'm using), but the implication doesn't go in the other direction. Saying that an expression is $\log x + O(1)$ means that the dominant term is $\log x$ and the rest of the terms are of constant order. The expression $\log x + \gamma + O(\log x/x)$ has that property. So, in a sense, you're right to say that the $O$ term "includes" the $\gamma$. –  Mike Spivey Nov 6 '11 at 20:52
@Carolus: 2) It is absorbed into the $O(x^{1-a})$ expression. Since $\zeta(a)/(1-a)$ is a constant, the expression $(x^{1-a} \zeta(a))/(1-a)$ is $O(x^{1-a})$. Then the sum of two $O(x^{1-a})$ expressions is also $O(x^{1-a})$. (And no need to apologize for asking questions! Asymptotic expressions can be tricky to deal with when you first meet them.) –  Mike Spivey Nov 6 '11 at 20:57