Maths Olympiad Prep

Library / /86 of 128

Algebra Difficulty 5.8 AIME, harder Find the answer Philippines

Problem:
Let a=444444a = 444 \cdots 444 and b=999999b = 999 \cdots 999 (both have 2010 digits). What is the 2010th digit of the product aba b?

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Solution:
Let us first express aa and bb in terms of their digits.

aa consists of 20102010 digits, all 44's. So,
a=4444442010 digits=4×1111112010 digits a = \underbrace{444\cdots 444}_{2010\ \text{digits}} = 4 \times \underbrace{111\cdots 111}_{2010\ \text{digits}}
Let N=1111112010 digitsN = \underbrace{111\cdots 111}_{2010\ \text{digits}}. Then a=4Na = 4N.

Similarly,
b=9999992010 digits=1020101 b = \underbrace{999\cdots 999}_{2010\ \text{digits}} = 10^{2010} - 1

Now, the product:
ab=(4N)(1020101)=4N1020104N a b = (4N)(10^{2010} - 1) = 4N \cdot 10^{2010} - 4N

Let us compute NN:
N=111111=10201019 N = 111\cdots 111 = \frac{10^{2010} - 1}{9}
So,
4N=4(1020101)9 4N = \frac{4(10^{2010} - 1)}{9}

Therefore,
ab=4N1020104N=4N(1020101)=4N1020104N a b = 4N \cdot 10^{2010} - 4N = 4N (10^{2010} - 1) = 4N \cdot 10^{2010} - 4N

Let us write 4N4N explicitly:
4N4N is a number with 20102010 digits, all 44's, so 444444444\cdots 444 (20102010 digits).

So 4N1020104N \cdot 10^{2010} is the number 444444444\cdots 444 (20102010 digits) followed by 20102010 zeros.

Subtract 4N4N:
ab=4444440000002010 zeros444444 a b = 444\cdots 444\underbrace{000\cdots 000}_{2010\ \text{zeros}} - 444\cdots 444

This is the same as writing:
(444...444(2010 digits)000...000(2010 zeros))(000...000444...444) \left(\begin{array}{c} \text{444...444} \\ \text{(2010 digits)} \\ \text{000...000} \\ \text{(2010 zeros)} \end{array}\right) - \left(\begin{array}{c} \text{000...000} \\ \text{444...444} \end{array}\right)

So, the subtraction is:
- The first 20102010 digits are 444444444\cdots 444 minus 00's, so 444444444\cdots 444.
- The last 20102010 digits are 00's minus 444444444\cdots 444.

But since we are subtracting 444444444\cdots 444 from 000000000\cdots 000, we need to borrow.

Let us perform the subtraction:

Let X=444444 000000X = 444\cdots 444\ 000\cdots 000 (20102010 44's, 20102010 00's), and subtract Y=000000 444444Y = 000\cdots 000\ 444\cdots 444 (20102010 00's, 20102010 44's).

So, the result is:
- The first 20102010 digits: 444444444\cdots 444 minus 00's = 444444444\cdots 444.
- The last 20102010 digits: 00's minus 444444444\cdots 444 = need to borrow.

Let us look at the last 20102010 digits:

Subtracting 444444444\cdots 444 from 000000000\cdots 000 means that we get 999999444444+1999\cdots 999 - 444\cdots 444 + 1 (since 10kx=999999x+110^k - x = 999\cdots 999 - x + 1 for kk digits).

So, the last 20102010 digits are 999999444444+1=555555+1=555556999\cdots 999 - 444\cdots 444 + 1 = 555\cdots 555 + 1 = 555\cdots 556 (20102010 digits, last digit 66).

But, since we borrowed 11 from the previous digit, the 20102010th digit from the left is the last digit of the first 20102010 digits, after borrowing 11.

Let us clarify:
- The number has 2010+2010=40202010 + 2010 = 4020 digits (possibly 40194019 if there is a leading zero, but in this case, the subtraction does not reduce the number of digits).
- The first 20102010 digits are 444444444\cdots 444 minus 11 (because of the borrow).

So, 4444441=444443444\cdots 444 - 1 = 444\cdots 443 (the last digit is 33).

Therefore, the first 20092009 digits are 44's, and the 20102010th digit is 33.

Thus, the 20102010th digit of abab is 33.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.