Solve for $b$ in $2^b\bmod11=7$ If I have the equation-
$$ 2^b \bmod 11 = 7 $$
How can I solve this to find out what $b$ is? 
I know $b$ is $7$ but I'd like to know how this is done mathematically rather than guessing. 
 A: Since $2$ are $11$ are relatively prime, using Fermat's little theorem, we get that $2^{10}=1 (mod 11)$. Hence you only need to check for only $b=1,2,...,10$
A: I am giving you a genaralised solution for this-
You need this theorem-
$\color{red}{a\equiv b\pmod c\implies na\equiv nb\pmod c}$
Proof:-
$a\equiv b\pmod c\implies c|(a-b)$ and $na\equiv nb\pmod c\implies c|(na-nb)\implies c|n(a-b)$ Now,we have already proved $c|(a-b)$
Coming back to the problem-
Notice that $2^n$ for $n<3$ is less than $11$ hence remainder is $0$.
So,start working from $n=4$.
By small and simple calculation $2^4\equiv5\pmod{11}....[1]$
By our above theorem,multiplying by $2$ we have,
$2^5\equiv10\pmod {11}...[2]$($2^4\times2\equiv5\times2\pmod{11}$)
Similarly by repeated multiplication by $2$ have the following congruences-
$$2^6\equiv9\pmod {11}...[3]$$
$$2^7\equiv7\pmod {11}...[4]$$
$$2^8\equiv3\pmod {11}...[5]$$
$$2^9\equiv6\pmod {11}...[6]$$
$$2^{10}\equiv1\pmod {11}...[7]$$
$$2^{11}\equiv2\pmod {11}...[8]$$
$$2^{12}\equiv4\pmod {11}...[9]$$
$$2^{13}\equiv8\pmod {11}...[10]$$
$$2^{14}\equiv5\pmod {11}...[11]$$
So,we observe that from $2^{14}$ the series starts repeating the remainders.
So form here we have $n=7$ as a solution.
But,what about a more generalised solution?
The remainders are in an AP.
We know nth term of an $AP$ is $a_n=a+(n-1)d$
Since we have not taken $n=1,2,3$ we do this correction to our formula-
$(a_n-3)=a+(n-1)d$
$\implies(a_n-3)=4+(n-1)10$.
(We take $a=4$ since when the next power of $2$ comes to the fouth place after completing the whole cycle of remainders from $[1]$ to $[10]$ and again repeating the remainders of $[1],[2],[3],[4]...$)
Solving we get,
$\displaystyle\frac{a_n+3}{10}=n$
Now,$n$ has to be a integer since term of a series cannot be in fraction.
So,by intuition we see that $a_n$ must end in $7$ ($7+3=10$ and we have $10$ in denominator).
So,$\color{red}{7,17,27...n7}$ is the set of solutions for this.(n is any integer).
Hope this helps and please comment me if you have difficulty in understanding any part of the solution!!
