How to bound $\sum_{\ell^2 + m^2 \leq y } \tau(\ell^2 + m^2)$? Let $\tau$ be the divisor function. I would like to know how I can obtain 
$$
\sum_{\ell^2 + m^2 \leq y  } \tau(\ell^2 + m^2) \ll y \log y. 
$$
Any comments would be appreciated. Thank you!
 A: Here is a sketch. By multiplicativity,
$$\sum_{n = 1}^{\infty} \frac{\tau(n) \sum_{d \mid n} \chi_4(d)}{n^s} = \prod_p \sum_{r = 0}^{\infty} \frac{\tau(p^r) \sum_{d \mid p^r} \chi_4(d)}{p^{rs}}.$$
We have that $\tau(p^r) = r + 1$, and if $p \equiv 1 \pmod{4}$, then $\sum_{d \mid p^r} \chi_4(d) = r + 1$, while if $p \equiv 3 \pmod{4}$, then $\sum_{d \mid p^r} \chi_4(d) = 1$ if $r$ is even and $\sum_{d \mid p^r} \chi_4(d) = 0$ if $r$ is odd. Thus this is equal to
$$\prod_{p \equiv 1 \pmod{4}} \sum_{r = 0}^{\infty} (r + 1)^2 p^{-rs} \prod_{p \equiv 3 \pmod{4}} \sum_{\substack{r = 0 \\ r \equiv 0 \pmod{2}}}^{\infty} (r + 1) p^{-rs}.$$
By evaluating these geometric series,
$$\sum_{r = 0}^{\infty} (r + 1)^2 p^{-rs} = \frac{1 - p^{-2s}}{(1 - p^{-s})^4} = \frac{1 - \chi_4(p) p^{-2s}}{(1 - p^{-s})^2 (1 - \chi_4(p) p^{-s})^2},$$
and
$$\sum_{\substack{r = 0 \\ r \equiv 0 \pmod{2}}}^{\infty} (r + 1) p^{-rs} = \frac{1 + p^{-2s}}{(1 - p^{-s})^2 (1 + p^{-s})^2} = \frac{1 - \chi_4(p) p^{-2s}}{(1 - p^{-s})^2 (1 - \chi_4(p) p^{-s})^2}.$$
So
$$\sum_{n = 1}^{\infty} \frac{\tau(n) \sum_{d \mid n} \chi_4(d)}{n^s} = \prod_p \frac{1 - \chi_4(p) p^{-2s}}{(1 - p^{-s})^2 (1 - \chi_4(p) p^{-s})^2} = \frac{\zeta(s)^2 L(s,\chi_4)^2}{L(2s,\chi_4)}.$$
So this has a double pole at $s = 1$ due to the pole of $\zeta(s)$, whereas $L(s,\chi_4)$ is holomorphic for $\Re(s) \geq 1$. Now any Tauberian theorem will do the job, or more generally one could use Perron's formula.
