1. ## digit

Say you want to find the units digit of $\left\lfloor \frac{10^{20000}}{10^{100}+3} \right \rfloor$.

So you are working with mod 10.

But how do we get $-3^{199} \equiv -3^{3}(81)^{49} \equiv -27 \equiv 3( \mod 10)$?

What sequence of steps did we use to get to mod 10?

2. You don't understand the sequence of steps?

$
-3^{199} \equiv -3^{3}(81)^{49}$

should be obvious. Next you have $-3^3=27$ and $81^{49}\equiv 1^{49} \equiv 1 \mod 10$, so

$-3^{199} \equiv -27 \equiv 3 \mod 10$

3. Oh, I see what you probably wanted now. You wanted to know how to get to $-3^{199}$?

4. Originally Posted by Sampras
Say you want to find the units digit of $\left\lfloor \frac{10^{20000}}{10^{100}+3} \right \rfloor$.

So you are working with mod 10.

But how do we get $-3^{199} \equiv -3^{3}(81)^{49} \equiv -27 \equiv 3( \mod 10)$?

What sequence of steps did we use to get to mod 10?
Divide top and bottom by $3^{100}$ to get $\frac{10^{20000}}{10^{100}+3} = \frac{10^{19900}}{1+3*10^{-100}}$. Then use the binomial expansion

\begin{aligned}10^{19900}(1+3*10^{-100})^{-1} = \;&10^{19900}\bigl(1-3*10^{-100} +3^2*10^{-200} - \ldots \\ & +3^{198}*10^{-19800} {\color{red}-3^{199}*10^{-19900}} + 3^{200}*10^{-20000} - \ldots\bigr).\end{aligned}

The terms before the highlighted one all give multiples of 10, so will not affect the units digit. The terms following the highlighted one are all very small and rapidly decreasing fractions, and the first of them is positive, so the overall sum of them will be a small positive fraction. Thus the highlighted term is the one that determines the units digit.