I'm reading the paper 'Jutila, Matti. "On the Mean Value of $L (1/2, χ)$ FW Real Characters." Analysis 1.2 (1981): 149-161.' 

Let $\chi_4(n)$ is the real primitive nonprincipal character of modulo 4, that is,

$$
\chi_4(n)=\begin{cases}
1, & n \equiv 1 \quad(4) \\
-1, & n \equiv 3 \quad(4) \\
0, & \text{otherwise}
\end{cases}
$$,

and $\chi_0^{(k)}$ be a principal character mod $k$. We denote the function that gives the number of positive divisor and the mobius function by $\tau(n)$ and $\mu(n)$ respectively.

In the paper p.152, the author estimates a character sum (stated below) as the following:

$$
\frac{1}{2}\sum_{a\leq X^{1/2}}\mu(a)\chi_0^{(2k)}(a)
\sum_{0<n\leq Xa^{-2}}(\chi_0^{(2)}(n)+\chi_4(n))\chi_0^{(k)}(n)$$ 
$$
=\frac{1}{2}X(\phi(2k)/2k)\sum_{a\leq X^{1/2}}\mu(a)\chi_0^{(2k)}(a)a^{-2}+O(X^{1/2}\tau(k)).
$$


It is easy to see that 
$$
\frac{1}{2}\sum_{a\leq X^{1/2}}\mu(a)\chi_0^{(2k)}(a) 
\sum_{0<n\leq Xa^{-2}}\chi_0^{(2)}(n)\chi_0^{(k)}(n) $$
$$ \approx \frac{1}{2}X(\phi(2k)/2k)\sum_{a\leq X^{1/2}}\mu(a)\chi_0^{(2k)}(a)a^{-2},
$$

so I think that the term $O(X^{1/2}\tau(k))$ is contributed by $\frac{1}{2}\sum_{a\leq X^{1/2}}\mu(a)\chi_0^{(2k)}(a)\sum_{0<n\leq Xa^{-2}}\chi_4(n)\chi_0^{(k)}(n)$. 

However I cannot derive this equation. The author says that he used the 'elementary estimates for character sums', but if I use the 'elementary estimates', for example, $\sum \chi(n) \leq q$ or the Polya-Vinogradov inequality $\sum \chi(n) \ll q^{1/2}\log q$ (here $q$ is the modulus of character $\chi$), it is not really effective in my view. (I'll explain soon)

I think the $X^{1/2}$ part in the big $O$ is coming from the term $\frac{1}{2}\sum_{a\leq X^{1/2}}\mu(a)\chi_0^{(2k)}(a)$.

Meanwhile, the sum of principal character $\chi_0^{(k)}$ only depends on $p(k)$, the product of distinct prime divisors of $k$, so I didn't catch why $\tau(k)$ is presented. 



My approach using the Polya-Vinogradov estimates:

If I use the Polya-Vinogradov estimates, since the modulus of the character $\chi_4\chi_0^{(k)}$ is smaller than $4p(k)$, we have

$$
\sum \chi_4(n)\chi_0^{(k)}(n) \ll (4p(k))^{1/2}\log(4p(k)).
$$

Thus we want to that $(4p(k))^{1/2}\log(4p(k)) \ll \tau(k)$, but there is a possibility that $\tau(k)=2^{\omega(k)}$, where $\omega$ is the prime omega function (that gives the number of prime divisors of $k$), so I believe that this equation does not hold.


How I derive the estimate in the paper?