# Rightmost digit of $\left \lfloor \frac{10^{20000}}{10^{100}+3} \right\rfloor$

How could I find $$0 \leq a \leq 9$$ such that

$$\left \lfloor \frac{10^{20000}}{10^{100}+3} \right\rfloor \equiv a \mod 10$$

?

-
This is a Putnam exam question, I believe. – Ron Gordon Feb 4 '13 at 10:24
Yes, maybe I should have mentionned it. – Chon Feb 4 '13 at 11:42

This didn't work as a comment to Hagen von Eitzen's answer, so I post it here.

Writing the fraction as \small\begin{align} &\frac{10^{20000}}{10^{100}}\frac1{1+3\cdot10^{-100}}\\ &=10^{19900}\left(1-3\cdot10^{-100}+\left(3\cdot10^{-100}\right)^2-\dots \color{#00A000}{-\left(3\cdot10^{-100}\right)^{199}}\color{#C00000}{+\left(3\cdot10^{-100}\right)^{200}-\dots}\right)\\ &\equiv\color{#00A000}{-3^{199}}\color{#C00000}{+\epsilon}\pmod{10^{100}} \end{align} where $0\le\epsilon\le\left(\frac{9}{10}\right)^{100}$

Thus, \begin{align} \left\lfloor\frac{10^{20000}}{10^{100}+3}\right\rfloor &\equiv-3^{199}\pmod{10^{100}}\\ &\equiv-\left(3^4\right)^{49}\,3^3\pmod{10}\\[6pt] &\equiv-1^{49}\,7\pmod{10}\\[12pt] &\equiv3\pmod{10} \end{align}

-
So $\lfloor ... \rfloor \equiv -3^{199} \equiv 3 \pmod{10}$ Thanks a lot! – Chon Feb 4 '13 at 17:13
@Chon: yes, that's correct. I didn't mark this as a hint since it was intended as a comment to Hagen von Eitzen's answer (it is essentially the same). I guess I can add the final steps since it is obviously not giving anything away :-) – robjohn Feb 4 '13 at 17:23

HINT: \begin{align}10^{20000}=&(10^{100}+3)\cdot\bigl(10^{19900}-3\cdot 10^{19800}+9\cdot10^{19700}-27\cdot 10^{19600}\pm\ldots\\&+(-3)^{k}\cdot 10^{19900-100k}\pm\cdots+(-3)^{199}+\epsilon\bigr)\end{align} with $\epsilon\approx 3^{100}10^{-100}>0$

-
Not that it makes a difference to the final answer, but I believe that $\epsilon\approx\left(\frac{9}{10}\right)^{100}$. – robjohn Feb 4 '13 at 14:38