Primitive roots of unity in p adic integers

Question is to find a condition when can be $\mathbb{Z}_p$ has an $m$th root.

First non trivial and simple root of unity is fourth root of unity $m=4$.

So, we want to know when does $f(x)=x^2+1$ has solution in $\mathbb{Z}_p$.

Suppose it has then it has to be of the form $x=a_0+a_1p+a_2p^2+\cdots$ i.e., we have $$\sqrt{-1}=a_0+a_1p+a_2p^2+\cdots$$

Squaring and going modulo $p$ we have $-1\equiv a_0^2\mod p$

Special case when $p=5$ we have $a_0=2$.

Special case when $p=3$ we have no solution.

I observe that this boils down to the question

Given prime $p$, which roots of unity does $\mathbb{F}_p$ contain?

I guess it is sufficient to look for $a_0$. Once we find $a_0$ then $a_i$ for $i\geq 1$ exists automatically.

• This may be useful: math.stackexchange.com/questions/576733/… . Obviously, you can recall that for all $x \in \Bbb{F}_p^{\times}$ you have $x^{p-1}=1$, then use Hensel lemma. – Crostul Dec 21 '16 at 8:14
• @Crostul: I think I understand your comment... I already used Hensel's lemma and said that it is sufficient to find $a_0$... We have $a_0^{p-1}\equiv 1 \mod p$ we want $a_0^2\cong -1 mod p$ i.e., $a_0^4\cong 1 \mod p$ so, it is sufficient and necessary that $4$ divides $p-1$ and in general i think it is necessary and sufficient that $m$ divides $p-1$... Am i correct? – user87543 Dec 21 '16 at 8:44

In a word, $\Bbb Q_p$ has no $p$-th roots of unity, except for $p=2$. Beyond that, the torsion in the multiplicative group is exactly isomorphic to the multiplicative structure of $\Bbb F_p$: cyclic of order $p-1$. So, to answer your question, you only need look at the relationship between $m$ and $p-1$.