TITLE: For what $n$ does $x^n \equiv 2\pmod{13}$ have a solution?
QUESTION [6 upvotes]: I want to ask for what values of $n$ the congruence $$x^n \equiv 2 \pmod{13}$$ has a solution for $x$.

REPLY [3 votes]: For this question it is assumed that the student is familiar with primitive roots.
Note that $2$ is a primitive root of $13$. In other words, the smallest exponent that when $2$ is raised to it gives $1$ is $12$.
Now you need to know this theorem:
Theorem: If $p$ is a prime number and $a$ is an integer such that $(a,p)=1$ and $g$ is a primitive root of $p$ such that $g^b \equiv a \pmod{p}$ then $x^n \equiv a \pmod{p}$ has a solution if and only if $(n,p-1)|b$
Do you see how you can apply this theorem here?