An asymptotic formula for $\sum_{n\leq x}\tau_k(n)$ Prove that for $k\geq 2$ $$\sum_{n\leq  x}\tau_k(n)=xP_k(lnx)+O_k(x^{1-1/k}(lnx)^{k-2})$$ where $\tau_k(n)=\sum_{d_1...d_k=n}1$ and $P_k$ is a polynomial of degree $k-1$ and leading coefficient $1/(k-1)!$. I tried to use the hyperbole metod to $\tau_k(n)=\sum_{d|n}1\star\tau_{k-1}(n)$, and then proceed by induction on $k$. But I have a lot of difficulties...
 A: This is detailed in Chapter XII, p.319 of Titchmarsh. The first analysis is $$\text{for } Re(s) > 1, \qquad \zeta(s)^k = \sum_{n=1}^\infty \tau_k(n) n^{-s} = s \int_1^\infty (\sum_{n < x}\tau_k(n)) x^{-s-1}dx$$
By inverse Mellin transform, for $x \not \in \mathbb{N}$ and $\sigma > 1$ :
$$\sum_{n < x}\tau_k(n) = \frac{1}{2i\pi}\int_{\sigma-i\infty}^{\sigma+i\infty} \zeta(s)^k \frac{x^s}{s}ds = \underbrace{\frac{1}{2i\pi}Res(\zeta(s)^k \frac{x^s}{s},1)}_{=x P_k(\ln x)}+\frac{1}{2i\pi}\int_{C} \zeta(s)^k \frac{x^s}{s}ds$$
where $C$ is a contour similar to $(\sigma-i\infty ,\sigma+i\infty)$ shifted on the left of $s=1$. 
Letting $C = [a-i\infty,a+i\infty],a = 1-1/k+\epsilon$ and showing that $\zeta(a+it) = \mathcal{O}(t^{1-a})$ so that it converges, you get that $\int_{C} \zeta(s)^k \frac{x^s}{s}ds = \mathcal{O}(x^{1-1/k+\epsilon})$
A: By Dirichlet's hyperbola method, we have
$$
\sum_{n\leq x}\tau_2(n) = x\log x + (2\gamma -1) x +O(\sqrt x).
$$
Thus, for $k=2$ the assertion is true. Now, assume that $k\geq 3$ and we have the assertion for all $m\leq k-1$. 
By inclusion-exclusion principle, we may write the sum as 
$$
\sum_{d_1\cdots d_k\leq x} 1=\Sigma_1-\Sigma_2+-\cdots (-1)^{j-1} \Sigma_j + \cdots +(-1)^{k-1} \Sigma_k,
$$
where $\Sigma_j$ is the sum over $k$-tuple $(d_1,\ldots,d_k)$ satisfying
$$
I\subseteq \{ 1, \ldots , k \}, \ \ |I|=j, \ \ d_i\leq x^{1/k} \ \textrm{ for any }i\in I.
$$
Consider $I=\{1,\ldots, j\}$. Then the sum over $d_i\leq x^{1/k}$ for any $i\in I$ can be written as
$$
\sum_{\forall i\leq j, \ d_i\leq x^{1/k}} \sum_{d_{j+1}\cdots d_k \leq \frac x{d_1\cdots d_j}}1 = \sum_{\forall i\leq j, \ d_i\leq x^{1/k}} \left( \frac x{d_1\cdots d_j}P_{k-j} (\log (\frac x{d_1\cdots d_j})) + O((\frac x{d_1\cdots d_j})^{1-\frac1{k-j}}\log^{(k-j-2)_{+}} x)\right)
$$
where $\log^m x = (\log x)^m$ and $(m)_{+}=\max\{m,0\}$. 
The big-O term after the sum of $d_1, \ldots, d_j$ is $O(x^{1-\frac1k}\log^{k-3} x)$. Also, for the sum 
$$
\sum_{\forall i\leq j, \ d_i\leq x^{1/k}} \frac x{d_1\cdots d_j} P_{k-j} (\log (\frac x{d_1\cdots d_j})),
$$
by multinomial theorem, there is a polynomial $Q_{k-j}$ of degree at most $k-1$ such that 
$$
\sum_{\forall i\leq j, \ d_i\leq x^{1/k}}   \frac x{d_1\cdots d_j}P_{k-j} (\log (\frac x{d_1\cdots d_j}))=xQ_{k-j}(\log x) + O(x^{1-\frac1k} \log^{k-2} x).
$$
Summing this over $j$, we obtain
$$
\sum_{n\leq x}\tau_k(n) = x P_k(\log x) + O(x^{1-\frac1k} \log^{k-2} x).
$$
This proves that $P_k$ is a polynomial of degree at most $k-1$. 
To show that the leading coefficient of $P_k$ is $\frac1{(k-1)!}$, assume so for $P_{k-1}$, we have by partial summation
$$
\sum_{d\leq x}\tau_{k-1}(d) \left(\frac xd+O(1)\right) \sim \frac 1{k-1} \cdot \frac x{(k-2)!} (\log^{k-1} x) = \frac1{(k-1)!} x\log^{k-1} x.
$$
