Definition:Ramanujan Sum

Definition
Let $e: \R \to \C$ be the mapping defined as:
 * $\forall \alpha \in \R: e \left({\alpha}\right) := \exp \left({2 \pi i \alpha}\right)$

For $q \in \N_{>0}$, $n \in \N$, the Ramanujan sum is defined as:


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

Also see
By Condition for Complex Root of Unity to be Primitive, $c_q \left({n}\right)$ is the sum of the $n$th powers of the primitive $q$th roots of unity.

This result is not to be confused with Ramanujan Summation.