<s>[INST] $x^n =2($mod $13)$ Consider the congruence $x^n =2($mod $13)$. Then for which n does it have a solution?


*

*n= 5

*n=6

*n=7

*n=8


Can we take any help from this fact  $x^{12 }=1 ($ mod $13),\forall x $?
Please give some hints.
 [/INST] From the fact you were given, you know that $$(x^6)^2=1\pmod{13}$$
So, for example, $x^6\neq 2\pmod{13}$ since $2^2\neq 1\pmod{13}$.
Because $13$ is prime, $x^2-1=0\pmod{13}$ has at most two solutions, the degree of the polynomial.  In fact it has exactly two: $1,-1$, found by inspection.
If $x^6=1$, then $x^7=2$ is equivalent to $x^1=2$.  $x^8=2$ is equivalent to $x^2=2$.  For $x^5=2$, we multiply both sides by $x$ to get $1=2x$.  Now we have three simpler modular equations to solve.
If $x^6=-1$, the situation is similar.
</s>