Find $x$ where $6 \equiv 7^{x} \pmod{71}$ I want to find the value of $x$ such that

$$6 \equiv 7^{x} \pmod{71}.$$

I don't know which formula would apply here, would Fermat's little theorem be applied here? or some other formula?
 A: Since $7^{70/2}\not\equiv 1\pmod{71}$, $7^{70/5}\not\equiv 1\pmod{71}$, $7^{70/7}\not\equiv 1\pmod{71}$, $7$ is a generator of $\mathbb{Z}/(71\mathbb{Z})^*$ and this is just an instance of the discrete logarithm problem. We may solve it through baby step-giant step, for instance. Since $\sqrt{71}$ is roughly $8$, we may compute $7^0,7^1,\ldots, 7^7\pmod{71}$ and store these elements in a set $A$. Then we may compute $7^8,7^{16},\ldots,7^{64}\pmod{71}$, store these elements in a set $B$ and check when $ab\equiv 6\pmod{71}$ for some $a\in A, b\in B$. Actually $6$ is an element of $B$ and the solution is given by
$$ 7^{\color{red}{32}+70k}\equiv 6\pmod{71}.$$
A: One checks $7$ is a generator of the cyclic group $\bigl(\mathbf Z/71\mathbf Z\bigr)^{\times}$, and $6$ has order $35$, hence $x$ is even coprime to $35$. 
On the other hand, $7^6=2$, hence we only have to solve for $7^x=3$. Using the fast exponentiation algorithm, we test for even values of $x$ coprime to $35$: first $x\equiv 0 \bmod6$, then the other possible values, i.e. $x\in\{4,8,16,22,26,32,34,38,44,46, 52, 58,62,64,68\}$.
One eventually finds $7^{26}\equiv3\mod71$, so that
$$6=2\cdot 3=7^6\cdot7^{26}=7^{32}.$$
