Definition:Ramanujan Sum

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

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


 * $\ds \map {c_q} n = \sum_{\substack {1 \mathop \le a \mathop \le q \\ \gcd \set {a, q} \mathop = 1} } \map e {\frac {a n} q}$

Also see
By Condition for Complex Root of Unity to be Primitive, $\map {c_q} n$ 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.