<s>[INST] 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!
 [/INST] Just to give a different approach, calculating mod $2000$ and using the fact that
$$3^{2000}=(1-10)^{1000}=1-1000\cdot10+\cdots\equiv1\mod2000$$
we have
$$\begin{align}
7^{2005}-1&=-1-(3-10)^{2005}\\
&\equiv-1-3^{2005}+2005\cdot3^{2004}\cdot10-{2005\choose2}3^{2003}\cdot10^2+{2005\choose3}3^{2002}\cdot10^3\\
&\equiv-1-3^5+5\cdot3^4\cdot10-{5\choose2}3^3\cdot100+{5\choose3}3^2\cdot1000\\
&\equiv-1-243+4050-27000+90000\\
&\equiv-244+50-1000\\
&=-1194\mod2000
\end{align}$$
and thus
$${7^{2005}-1\over6}\equiv{-1194\over6}=-199\equiv801\mod1000$$
</s>