---
tag: VTYJ9419C7
kind: concept
name: Character sum
msc: [11L40, 11L10]
sources:
  - url: https://en.wikipedia.org/wiki/Character_sum
same_as:
  wikidata: Q5073749
  wikipedia: Character sum
---

## Summary

A character sum is a sum of the values of a [[Dirichlet character|7XB5VJKDPG]] over a range of integers, such as $\sum_{M < n \le M + N} \chi(n)$.
Over a full period the sum is $0$ for a nonprincipal character.
So the interest lies in incomplete sums and in sums of $\chi(f(n))$ for polynomials $f$.
Bounds for character sums control the distribution of quadratic residues and of primitive roots, and they enter the study of [[Dirichlet L-functions|9D2Z543EJQ]].

## Explanations

### L1 human

A Dirichlet character assigns to each integer a root of unity or $0$, following a periodic and multiplicative pattern.
For the Legendre symbol modulo a prime $p$, the value is $+1$ on quadratic residues and $-1$ on non-residues.
A character sum adds these values over an interval, and so counts residues minus non-residues there.
A small sum means that residues and non-residues are well mixed in the interval.
