Quadratic periods modulo eleven (source code)

= Quadratic periods modulo eleven

If $Q$ and $N$ are the nonzero square and nonsquare classes modulo eleven and $\omega=e^{2\pi i/11}$, then
$$
\sum_{q\in Q}\omega^q=\frac{-1+i\sqrt{11}}2,
\qquad
\sum_{n\in N}\omega^n=\frac{-1-i\sqrt{11}}2.
$$
Their sum is $-1$, and their difference is the <Quadratic Gauss sum> $i\sqrt{11}$.