= Solution
Every <nonprincipal Dirichlet character> modulo the <prime> $q$ is primitive, so its finite <Fourier coefficients> have modulus one off zero; the coefficient at zero is zero by <character orthogonality>. <Fourier inversion theorem> gives
$$
\sum_{M<n\le M+N}\chi(n)
=q^{-1/2}\sum_{a=1}^{q-1}\widehat\chi(a)\sum_{M<n\le M+N}e(an/q).
$$
The finite <geometric series> gives
$$
\left|\sum_{M<n\le M+N}e(an/q)\right|
\le\frac{2}{|1-e(a/q)|}\le C\|a/q\|_{\mathbb R/\mathbb Z}^{-1}.
$$
The printed hint omits $n$ from the exponential; its literal constant summand would not obey the bound for arbitrary $N$. The geometric-series calculation proves the needed estimate independently. Pairing $a$ with $q-a$ gives
$$
\left|\sum_{M<n\le M+N}\chi(n)\right|
\le C\sqrt q\,2\sum_{a=1}^{(q-1)/2}\frac1a
\ll\sqrt q\log q.
$$
The last sum is a <harmonic number>. This proves the <Pólya–Vinogradov inequality> uniformly in $M$ and $N$; complete blocks of length $q$ also vanish by <Orthogonality of Dirichlet characters>.
Back to article page