I had asked this question here Geometric Progression: How to solve for $n$ in the following equation $\frac {5^n-1}4 \equiv 2 \pmod 7$ and accepted solution has conclusion
$$\frac{5^n-1}4\equiv 2\pmod 7\iff n\equiv 4\pmod 6$$
I wanted to understand how did the author reached to the conclusion. Yes I had asked him in the comment but maybe he is busy, so he did not reply back.
Can anybody help?
I thought it in this way
From $5^n\equiv2(mod~ 7)$ it is clear that $ 5^n=7k+2$
Now $7k+2$ must end with $5$ , so $k$ must end with $9$ (I think I don't need to explain why)
So after checking values of $k=9,19,29,39,\cdots$ you will see that $89$ is first to give natural $n$ which is $4$
Also since $4$ is less than $7$ and the next solution will be $11$ as I found , we can conclude $n=7l+4$ or $n\equiv 4(mod ~7)$
Not a very great answer but hope it will help....!!!