Pólya-Vinogradov Inequality

Theorem
Let $p$ be a positive odd prime.

Then:
 * $\forall m, n \in \N: \ds \size {\sum_{k \mathop = m}^{m + n} \paren {\frac k p} } < \sqrt p \, \ln p$

where $\paren {\dfrac k p}$ is the Legendre symbol.

Proof
Start with the following manipulations:

The expression:
 * $\ds \sum_{k \mathop = 0}^{p - 1} \paren {\dfrac k p} e^{-2 \pi i a t / p}$

is a Gauss sum, and has magnitude $\sqrt p$.

Hence:

Here $\norm x$ denotes the difference between $x$ and the closest integer to $x$, that is:
 * $\ds \norm x = \inf_{z \mathop \in \Z} \set {\size {x - z} }$

Since $p$ is odd, we have:

Now:
 * $\ln \dfrac {2 x + 1} {2 x - 1} > \dfrac 1 x$

for $x > 1$.

To prove this, it suffices to show that the function $f: \hointr 1 \infty \to \R$ given by:
 * $\map f x = x \ln \dfrac {2 x + 1} {2 x - 1}$

is decreasing and approaches $1$ as $x \to \infty$.

To prove the latter statement, substitute $v = 1/x$ and take the limit as $v \to 0$ using L'Hospital's Rule.

To prove the former statement, it will suffice to show that $f'$ is less than zero on the interval $\hointr 1 \infty$.

Now we have that:
 * $\map {f''} x = \dfrac {-4} {4 x^2 - 1} \paren {1 - \dfrac {4 x^2 + 1} {4 x^2 - 1} } > 0$

for $x > 1$.

So $f'$ is increasing on $\hointr 1 \infty$.

But $\map {f'} x \to 0$ as $x \to \infty$.

So $f'$ is less than zero for $x > 1$.

With this in hand, we have: