Drawing Kloosterman sums

For any power $q$ of a prime number (called the modulus), let us note $$ 1\leq j_1<\dotsc<j_{\varphi(q)}<q $$ the integers prime to $q$. For all $a$ and $b$ prime to $a$, and for $j_\ell$ one of the integers prime to $q$ defined above, we define the Kloosterman partial sum $K_j(a,b)$ by $$ K_{j_{\ell}}(a,b;q)=\frac{1}{\sqrt{q}}\sum_{n=1}^{\ell}\exp\left(2i\pi\frac{aj_n+b\overline{j_n}}{q}\right) $$ where $\overline{j_n}$ is an inverse of $j_n$ modulo $q$. Kloosterman’s partial sums are complex numbers. We can therefore associate them with points that we plot, one after the other, starting with $K_{j_1}(a,b)$ then $K_{j_2}(a,b)$ up to $K_{j_{\varphi(q)}}(a,b;q)$.

Kloosterman clouds

For fixed values of $q$, $a$ and $b$, we plot the points associated with Kloosterman’s partial sums, without linking them together. The color keeps track of the number of elements in each sum (or, equivalently, the order in which these points were plotted) according to the following scale:

Echelle de couleurs utilisées dans les graphes

Modulus is prime

Module 10007
$a=1$, $b=1$, $q=10\,007$

Module 100103
$a=1$, $b=1$, $q=100\,103$

Modulus is a power of prime

Module 10201
$a=1$, $b=1$, $q=10201=101^2$

Module 100489
$a=1$, $b=1$, $q=100\,489=317^2$

Kloosterman paths

For fixed values of $q$, $a$ and $b$, we plot the points associated with Kloosterman’s partial sums, and draw a segment between two consecutive points.

Modulus is prime

Module 10007
$a=1$, $b=1$, $q=10\,007$

Module 100103
$a=1$, $b=1$, $q=100\,103$

Module 1001041
$a=1$, $b=1$, $q=1\,001\,041$

Module 41161781
$a=1$, $b=1$, $q=41\,161\,781$

Modulus is a power of prime

Module 10201
$a=1$, $b=1$, $q=10201=101^2$

Module 100489
$a=1$, $b=1$, $q=100\,489=317^2$

Module 1018081
$a=1$, $b=1$, $q=1\,018\,081=1009^2$

Module 1030301
$a=1$, $b=1$, $q=1\,030\,301=101^3$

Module 12117361
$a=1$, $b=1$, $q=12\,117\,361=59^4$

One parameter fixed

For a fixed $b$, we draw the $\varphi(q)$ paths associated to the $\varphi(q)$ parameters $a$ and the fixed parameters $b$ and $q$. Each path is colored according to the previous scale.

Modulus is prime

Module b1q173
$b=1$, $q=173$

Module b1q20021
$b=1$, $q=20021$

Modulus is a power of prime

Module b1q10121
$b=1$, $q=10201=101^2$

Paths leading to the same Kloosterman sum

The last partial sum is called the Kloosterman sum $$ K(a,b;q)=\frac{1}{\sqrt{q}}\sum_{n=1}^{\varphi(q)}\exp\left(2i\pi\frac{aj_n+b\overline{j_n}}{q}\right). $$ We can show that $K(a\overline{b},b;q)=K(a,1;q)$. Taking the $\varphi(q)$ possible values for $a$, we then plot the $\varphi(q)$ different paths leading to the Kloosterman sum $K(a,1;q)$.

Modulus is prime

Module a1q173
$a=1$, $q=173$

Module a973q3121
$a=973$, $q=3121$

Module a248q3121
$a=248$, $q=3121$

Module a396q3121
$a=396$, $q=3121$

Modulus is a power of prime

Module a2611q3481
$a=2611$, $q=3481=59^2$

Module a3236q3481
$a=3236$, $q=3481=59^2$

Module a1523q3481
$a=1523$, $q=3481=59^2$