What is $(7^{2005}-1)/6 \pmod {1000}$? What is $$\frac{7^{2005}-1}{6} \quad(\operatorname{mod} 1000)\:?$$
My approach:
Since $7^{\phi(1000)}=7^{400}=1 \bmod 1000, 7^{2000}$ also is $1 \bmod 1000$.
So, if you write $7^{2000}$ as $1000x+1$ for some integer $x$, then we are trying to $((1000x+1)\cdot(7^5)-1)/6 = (16807000x + 16806)/6 \pmod {1000}$.
Obviously, this must be an integer, so $x=3y$ for some $y$. Then, we are trying to find $16807000\cdot 3y/6+2801 \pmod {1000} = 500y+801 \pmod {1000}$. However, this value can be $301$ or $801$, and I am not sure how to find which one is correct.
Any help is appreciated!

You can distinguish between the two possibilities you found by starting modulo $2000$:
because the Carmichael function of $2000$ is $100$, $7^{2000}\equiv(7^{100})^{20}\equiv1\bmod2000$,
so $7^{2005}\equiv7^5\equiv807\bmod 2000$.
Therefore, $7^{2005}-1\equiv806\bmod2000$.
Therefore, $\dfrac{7^{2005}-1}2\equiv403\bmod1000$.
Therefore, $\dfrac{7^{2005}-1}6\equiv403\times3^{-1}\bmod{1000}.$
In general, if $n=3k-1$ then $3^{-1}\equiv k\pmod n$,
and if $n=3k+1$ then $3^{-1}\equiv -k\pmod n$,
so  $3^{-1}\equiv-333\equiv667\bmod{1000}$.
Therefore, $\dfrac{7^{2005}-1}6\equiv403\times667\equiv801\bmod1000$.
