Condition for Complex Root of Unity to be Primitive

Theorem
If $n,k \in \N$, then $\alpha_k = \exp(2\pi i k/n)$ is a primitive $n^\text{th}$ root of unity if and only if $\gcd(n,k) = 1$.

Proof
Let $U_n = \{ \exp(2\pi i k/n) : 0 \leq k \leq n-1\}$ and $V = \{1,\ldots,\alpha_k^{n-1}\}$.

By Roots of Unity it is sufficient to show that $U_n = V$ if and only if $\gcd(n,k) = 1$.

If $\gcd(n,k) = d > 1$ then there are $n',k' \in \N$ such that $n' = dn$ and $k' = dk$.

Then we have $\alpha_k = \exp(2\pi i k'/n')$ and


 * $\alpha_k^{n'} = \exp(2 \pi i k') = 1$

Therefore $V = \{1,\ldots, \alpha^{n'-1} \}$ with $n' < n$, so $|V| = n' < n = |U_n|$, and $U_n \neq V$.

If $\gcd(n,k) = 1$, and


 * $\exp(2 \pi i k / n)^d = \exp(2 \pi i kd / n) = 1$

then we must have $kd/n \in \Z$. Since $\gcd(k,n) = 1$ it follows that $n | d$, and $d \geq n$.

Therefore $\{1,\ldots,\alpha^{n-1}\}$ are distinct, and $|V| = |U_n|$.

Moreover each element of $V$ can be written in the form $\exp(2\pi i k/n)$ with $0 \leq k \leq n-1$.

It follows that $V = U_n$.