Lab · Exponential sums
Kloosterman paths and curlicues
Add up unit vectors whose angles follow an arithmetic rule, and draw the running total. Kloosterman sums make symmetric closed shapes, Gauss sums make spirals, and quadratic sums with irrational angles make fractal curlicues.
Write $e(t) = e^{2\pi i t}$. An exponential sum adds unit complex numbers $e(f(x)/p)$ for $x$ running over $\mathbb{F}_p$. If the angles were random, the total would have size about $\sqrt p$, the length of a random walk with $p$ steps. The miracle, proved by Weil in the 1940s, is that for algebraic $f$ the sums really are that small. The Kloosterman sum $$\mathrm{Kl}(a, b; p) = \sum_{x=1}^{p-1} e\!\left(\frac{ax + b\bar x}{p}\right), \qquad x\bar x \equiv 1 \pmod p,$$ satisfies $|\mathrm{Kl}(a, b; p)| \le 2\sqrt p$. The applet draws the polygon of partial sums, from the first term (marigold) to the last (indigo), together with the circle of radius $2\sqrt p$.
The shapes
Kloosterman paths are symmetric because the terms for $x$ and $p - x$ are complex conjugates, so the sum is real and the second half of the path mirrors the first. Kowalski and Sawin (2016) showed that, rescaled by $\sqrt p$ and averaged over $a$ as $p \to \infty$, these paths converge in law to a random Fourier series $t\,\mathrm{ST}_0 + \sum_{h \ne 0} \frac{e(ht) - 1}{2\pi i h}\mathrm{ST}_h$ built from independent Sato–Tate variables. Kloosterman sums appear in the Fourier coefficients of modular forms (via the Petersson and Kuznetsov formulas), which is where most of their applications come from.
Quadratic Gauss sums $G(a; p) = \sum_x e(ax^2/p)$ make spirals that end at a point of absolute value exactly $\sqrt p$. Gauss found the exact value, $G(1; p) = \sqrt p$ for $p \equiv 1 \pmod 4$ and $i\sqrt p$ for $p \equiv 3 \pmod 4$, after four years of trying to fix the sign. Cubic sums $\sum_x e((x^3 + ax)/p)$ have no closed form, but Weil's bound $2\sqrt p$ still holds.
Curlicues are the sums $\sum_{n \le N} e^{\pi i n^2 x}$ for irrational $x$. They form spirals inside spirals, and Berry and Goldberg (1988) explained the self-similarity by a renormalisation map $x \mapsto -1/x$: the sizes of the spirals are governed by the continued fraction of $x$, which is why the golden ratio gives the tidiest picture. The same transformation, the theta function's modularity, drives the Hardy–Littlewood bounds for these sums.
Full proof: the Gauss sum has absolute value √p
Proposition. For an odd prime $p$ and $p \nmid a$, $|G(a; p)|^2 = p$.
Proof. Expanding, $$|G(a; p)|^2 = \sum_{x, y \in \mathbb{F}_p} e\!\left(\frac{a(x^2 - y^2)}{p}\right) = \sum_{y, h} e\!\left(\frac{a(2yh + h^2)}{p}\right),$$ substituting $x = y + h$. For fixed $h$, the inner sum over $y$ is $e(ah^2/p)\sum_y e(2ahy/p)$, which is $p$ if $h = 0$ and $0$ otherwise, because $2ah \not\equiv 0$ and the sum of a nontrivial additive character over $\mathbb{F}_p$ vanishes. Only $h = 0$ survives, giving $p$. $\square$
The same "square and shift" trick gives $|\mathrm{Kl}|$ on average, but the pointwise bound $2\sqrt p$ for Kloosterman sums needs Weil's Riemann hypothesis for the curve $y^p - y = ax + b/x$; an elementary proof was later found by Stepanov's method.
Further reading
- H. Iwaniec and E. Kowalski, Analytic Number Theory, AMS Colloquium Publications 53, 2004, Chapters 11–12.
- E. Kowalski and W. Sawin, Kloosterman paths and the shape of exponential sums, Compositio Mathematica 152 (2016).
- M. V. Berry and J. Goldberg, Renormalisation of curlicues, Nonlinearity 1 (1988).
- B. C. Berndt, R. J. Evans and K. S. Williams, Gauss and Jacobi Sums, Wiley, 1998.