# Consider $T$ = $9 \times 99 \times 999 \times 9999 \times \cdots \times \underbrace{999…9}_{2015 \:nines}$

Consider $T$ = $9 \times 99 \times 999 \times 9999 \times \cdots \times \underbrace{999....9}_{2015 \:nines}$

Find the last 3 digits of $T$

Advise: I wrote it down wrong the first time, it should be a product of "2015" numbers, i apologize about that, i realized my fault when i was travelling and i couldn't repare it in my cellphone.

My try

I know the last digit, i found it easily, but the struggle is with the others. I tried this:

$9 \times 99 \times 999 \times \cdots \times \underbrace{999 \ldots 9}_{2015 \:nines}$ $= 9 \times 9(11) \times 9(111) \times \cdots \times 9(\underbrace{111 \ldots 1}_{2015 \:ones})$

So $T$ = $9(1+11+111+ \cdots +\underbrace{111 \ldots 1}_{2015 \:ones})$

But from here i found nothing, any hints?

• What is the last digit that you found? – Mohammad Zuhair Khan Feb 6 '18 at 5:46
• @MohammadZuhairKhan 9 – Rodrigo Pizarro Feb 6 '18 at 5:47
• Wouldn't it be enough to compute 9*99*999*999 and get the last 3 digits of the result? – Cristian Lupascu Feb 6 '18 at 13:10
• the last 3 digits of $9*99*999*999$ are 891 – Rodrigo Pizarro Feb 6 '18 at 13:30
• I hate this kind of careless question. The title clearly indicates a product of four numbers, but one line of the body suggests a product of 2015 numbers, and that seems more plausible. So half the answers answer one question and half answer the other. Of course the OP disappears and fails to resolve the confusion. – almagest Feb 6 '18 at 18:24

The question was changed from a product of four to a product of 2015 factors.

Maybe the author of the question may change the number of factors again, so let's solve it for any number of factors $n \geq 3$:

$$\prod_{k=1}^n\sum_{i=0}^{k-1}9 \times 10^i \equiv 9 \times 99 \times \prod_{k=3}^n999 \equiv 9\times 99 \times (-1)^{n-2} \equiv \left\{ \begin{array}{ll} 109 \mbox{ mod } 1000 & n= 2k+1 \\ 891 \mbox{ mod } 1000 & n = 2k \end{array} \right.$$

So, for $n = 2015$ we get $109$.

I leave the cases $n=1$ and $n=2$ for the inclined reader :-).

Hint:

$$T\equiv9\cdot99\cdot999^{2015-2}\pmod{1000}$$

Now $999\equiv-1\pmod{1000}\implies999^{2013}\equiv(-1)^{2013}\equiv-1$

$$\implies T\equiv(10-1)(100-1)(-1)\equiv-1+10+100$$

• As $$\underbrace{999...99}_{n \text{ digits }}\equiv999\pmod{1000}$$ for $n\ge3$ – lab bhattacharjee Feb 6 '18 at 5:55
• How do you get $999^{2015-2}$? I see mod 1000 only $9, 99, 999^2$ – trancelocation Feb 6 '18 at 12:17
• @zardos, Have u noticed my last comment? Here $$3\le n\le2015$$ – lab bhattacharjee Feb 6 '18 at 14:28

$T=891\times (1000a_3-1)(1000a_4-1)(1000a_5-1)\cdots(1000a_{2015}-1)$ for some integers $a_3,a_4,a_5,\dots,a_{2015}$.

So, $T=891\times (1000a-1)$ for some integer $a$.

The last three digits are $109$.

Well, following from where you ended up:

$T = 9(1 \times 11 \times 111 \times ...)$

Notice that except for the first and second terms, the other 2013 terms are congruent to 111 (mod 1000).

So $T \equiv 9(1 \times 11\times 111^{2013}) \pmod {1000}$

We will use the property that $\varphi (n^m) = n^{m-1} \varphi (n)$

So $\varphi (10^3) = 10^2 \varphi (10) = 100 \times 4 = 400$

Since $2013 = 400 \times 5 + 13$,

$9(1 \times 11\times 111^{2013} \equiv 9(11 \times 111^{13}) \equiv 9(11 \times 111^{10} \times 111^3) \equiv 9(11 \times (111^2 )^5 \times 1367631) \equiv 9(11 \times 12321^5 \times 631) \equiv 9(11 \times 321^5 \times 631) \equiv 9(11 \times 3408200705601 \times 631) \equiv 9(11 \times 601 \times 631) \equiv 9(4171541) \equiv 9(541) \equiv 4869 \equiv 869 \pmod {1000}$

• It has already been found, that the correct result is $\small{9\cdot 99 \cdot (-1)^{2013} \equiv 9\cdot 99 \cdot (-1) \equiv -891 \equiv 109 \pmod {1000}}$. See lab bhattacharjee's answer – Gottfried Helms Feb 7 '18 at 7:57
• Yeah I didn't bothee checking whether OP's equality was actually right, my bad – Francisco José Letterio Feb 7 '18 at 15:49