At the beginning of Ch.8 of the book Apostol's Analytic Number Theory, it is written:
[consider] ... the exponential function $$f(n) = e^{2\pi i mn/k} $$ where $m$ and $k$ are fixed integers. The number $e^{2\pi i m/k}$ is a $k$th root of unity and $f(n)$ is its $n$th power.
Is this true if $\gcd (m,k)>1$? Isn't it necessary for $m$ to be either prime or $1$?
For example let $k=2m$ and $m$ is a prime, then the number $e^{2\pi i m/k}$ will be $\frac{k}2$th of root of unity. Later on the book it appears that the $\gcd (m,k)=1$ is never considered.
All that is necessary (and sufficient) for $z$ to be a $k$th root of unity is for $z^k = 1$. That is all.
$$(e^{2 \pi i m / k})^k = e^{2 \pi i m} = 1$$
So they're all $k$th roots.
If, for example, $k = a \cdot m$, then it will also be true that it's an $a$th root:
$$(e^{2 \pi i m / k})^a = (e^{2 \pi i m/(a\cdot m)})^a = 1$$
So given $k = q \cdot m$, then for which $b \in \mathbb N$ is this a $b$th root? $$(e^{2 \pi i m / k})^b = (e^{2 \pi i /q})^b = 1 \quad\text{ iff }\quad b/q \in \mathbb Z \; .$$ Now $b/q = b/(k/m) = bm/k$. This tells us that $e^{2 \pi i m /k}$ is a $b$th root precisely when $b$ is a multiple of $k/m$. So what is the smallest integral multiple of $k/m$? It is $k/\mathrm{gcd}(k,m)$. To see this, first imagine simplifying the fraction by eliminating common factors: this is $\mathrm{gcd}(k,m)$. Then we multiply by the denominator, which is now $m/\mathrm{gcd}(k,m)$. We multiply this by $k/m$ to obtain its smallest integral multiple.
In conclusion, $e^{2 \pi i m / k}$ is a $b$th root for precisely the following $b$:
$$b \in \{ n \cdot k / \mathrm{gcd}(k,m) : n \in \mathbb N\}$$