Question: Consider the congruence $x^n =2($mod $13)$. Then for which n does it have a solution?

1. n= 5
2. n=6
3. n=7
4. n=8

Can we take any help from this fact $x^{12 }=1 ($ mod $13),\forall x $?

Please give some hints.

Answer: 
If $x$ is of the form $2^m$, then we have $$2^{mn}=2\mod 13\\ \Rightarrow 2^{mn-1}=1\mod 13$$ So, we need to have $12|mn-1$i.e. we need to solve the linear Diphontine equation $mn-12k=1$ clearly then, $n$ cannot be $6$ or $8$. For $n=5,$ a solution to $m,k$ is $m=5,k=2$. For $n=7$, a solution is $m=7, k=4$. So, for $n=5,7$ the congruence equation has solutions for $x$ and such solutions are $2^5,2^7$ respectively.
As you know from the theorem, $x^{p-1} = 1 (mod p)$ so if you want to get number 2 you can use $x^{p-1}+1 = 2 (mod p)$

 It's one kind of solution. Now you can extend $x^{p-1}+1$ type numbers.