5
$\begingroup$

Let $a$ be an integer $\underbrace{33\ldots 33}_{2013}$ and let $b$ be the integer $\underbrace{66\ldots66}_{2013}$

What is the 2014th digit (from the right) that appears in the product $ab$?

I tried using mod, but is it the correct way to approach this problem?

  • 3
    $= 18\cdot 111\ldots111^2$. Obviously the digit you are asking for is in the middle of a mass of high-value binomial coefficients. I don't immediate see an easy way of extracting this with something much simpler than a full calculation.2017-01-16
  • 0
    What does "but is it true" mean here? What is it that you're asking about exactly?2017-01-16
  • 0
    @Omnomnomnom is it correct way of answering the ques?2017-01-16
  • 0
    See [here](http://math.stackexchange.com/q/112932/11619) for possibly useful formulas about the digits of the square of a repunit. The formula in the fourth bullet of my answer may prove to be useful.2017-01-16
  • 0
    @JyrkiLahtonen what is a repunit?2017-01-17

2 Answers 2

9

\begin{align} ab&=18\cdot[\frac{10^{2013}-1}{9}]^2=\frac29[10^{4026}-2\cdot10^{2013}+1]\\ &=\frac29[(10^{4026}-1)-2(10^{2013}-1)]\\ &=2\cdot\frac{10^{4026}-1}9-4\cdot\frac{10^{2013}-1}9\\ &=\underbrace{22\ldots 2}_{4026}-\underbrace{44\ldots 4}_{2013}\\ &=\underbrace{22\ldots 2}_{2013}\underbrace{00\ldots 0}_{2013}-\underbrace{22\ldots 2}_{2013}\\ &=\underbrace{22\ldots 2}_{2012}1\underbrace{77\ldots 7}_{2012}8 \\ \end{align}

  • 0
    Can u explain me the 2nd step? That 2/9[10^4916 -2.10^2013+1]? I know it's a dumb thing to ask but I don't want to proceed without understanding things. Please help me.2017-01-17
  • 0
    Just factor out $18\over{9^2}$ and expand the whole square2017-01-17
  • 0
    I guess u have to replace 4016 with 4026 everywhere right?2017-01-17
  • 0
    Yes, sorry for that. I typed this answer at midnight.2017-01-17
  • 0
    And 2 is the answer right? Coz Henning Makholm has given the answer as 12017-01-17
  • 0
    The answer is still $1$, the 2014-th digit from the right.2017-01-17
  • 0
    @hkmather802 lol ok2017-01-17
  • 0
    @hkmather802 ok ok I got it. Well thanks a lot for the answer. ^_^ :-)2017-01-17
  • 0
    Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/51929/discussion-between-hkmather802-and-lokesh-sangewar).2017-01-17
5

Your number $ab$ is $18\cdot \underbrace{11\ldots 11}_{2013}{}^2$.

Let's imagine multiplying out the square of the repdigit with the usual pencil-and-paper algorithm. Before we start handling carries between the columns, the 2014th column will sum to $2012$, the one just to the right of it sums to $2013$, the one to the right of that sums to $2012$, then $2011$ and so forth (and what happens to the left is immaterial):

(To see this pattern, consider why $111{,}111{,}111\cdot 111{,}111{,}111= 12{,}345{,}678{,}987{,}654{,}321$, right before the columns start carrying into each other. The analogue of "2014th digit" here the 10th digit, which is the leftmost of the two 8s).

 2 0 1  2
+  2 0  1  3
+    2  0  1 2
+       2  0 1 1
+          2 0 1 0
+            .......
 ---------------------
=       ?

For simplicity, lets pre-multiply each of the rows here by $18$; then we will be adding

 3 6 2 1  6
+  3 6 2  3  4
+    3 6  2  1 6
+      3  6  1 9 8
+         3  6 1 8 0
+            3 6 1 6 2
+              .........
------------------------
          ?

In this addition there are only 5 nonzero digits in each column, so each carry is at most 4. The digits in the 2013th column sum to $4+1+1+6+3=15$, so depending on what the incoming carry is, the 2013th digit of the result is one of 5,6,7,8,9, and the carry into the 2014th column is necessarily $1$.

Therefore, summing the 2014th column, including the carry, we get $$ (6+3+2+6+3)+1 = 20+1 = 21 $$ so the final digit in the 2014th column is 1.