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?