If $5^{2015} \equiv n (\bmod 11) $ and $n \in \{0,1,2,...,10\}$ then what is the value of n?
I have succeeded to solve this problem using Fermat's little theorem and the value of $n$ is $1$ but my problem is different using a theorem or formula I get $ n^2 \equiv 1 (\bmod 11)$....(A)
The theorem is
$n$ is a positive integer and $\gcd(a,n)=1$.If $x^k \equiv a (\mod n)$ and $gcd(k,\phi (n))=d$; $n$ is prime iff $a^{\phi (n)/d} \equiv 1 (\mod n)$ , where $\phi (n)$ is Euler phi function.
Now in the equation (A) ,if we put $n=10$ and $n=1$ both values are satisfied but it is impossible since n must be any one number between $0$ to $10$.
Now I don't know know how to solve the theorem.WHAT IS THE MISTAKE IN THIS METHOD?