TITLE: Number of n-th roots of unity over finite fields
QUESTION [5 upvotes]: How many $n$-th roots of unity does a finite field $\mathbb{GF}\left(p^k\right)$ have? ($p$ is prime). And then kind of related to that, is there a finite field with exactly $n_1,\ldots,n_N$ $n_1$-th,...$n_N$-th roots of unity?

REPLY [9 votes]: I can quickly answer your first question. The multiplicative group of $\mathbb{GF}(p^k)$ is cyclic, let $g$ be a generator. For an element $x$ of the group $x^n=1$ holds iff $x=g^m$ with $nm$ divisible by $p^k-1$. The latter is equivalent to $m$ divisible by $(p^k-1)/d$, where $d:=\gcd(n,p^k-1)$, hence the $n$-th roots of unity form the subgroup generated by $g^{(p^k-1)/d}$. This subgroup clearly has $d$ elements, so the number of $n$-th roots equals $\gcd(n,p^k-1)$.
EDIT: I did not see KConrad's comment (I was typing slowly).
EDIT: The second question is also easy. It is clearly necessary that the $n_i$'s be coprime with $p$. If this condition holds, then there is a $k>0$ such that $p^k-1$ is divisible by each of the $n_i$'s, and such a $k$ will do by the above (while no other $k$ will do).