Definition:Ramanujan Sum

Definition
For $\alpha \in \R$ let $e(\alpha) = \exp(2 \pi i \alpha)$.

For $q \in \N$, $n \in \N \cup\{0\}$, we define the Ramanujan sum:


 * $\displaystyle c_q(n) = \sum_{\substack{1 \mathop \le a \mathop \le q\\\gcd(a,q) \mathop = 1}} e \left( \frac{an}q \right)$

Also see
By Primitive Roots of Unity, $c_q(n)$ is the sum of the $n^\text{th}$ powers of the primitive $q^\text{th}$ roots of unity.

This result is not to be confused with Ramanujan Summation.