Maths Olympiad Prep

Library / /8 of 87

Number theory Difficulty 5.1 AIME, harder Prove it Serbia

Problem:

Determine the smallest natural number which is divisible by 20092009 and whose digit sum equals 20092009.

Solution

Solution:

Since 2009=2239+22009 = 223 \cdot 9 + 2, the desired number has at least 224224 digits. We shall consider 224224-digit numbers x=c223c222c1c0x = \overline{c_{223} c_{222} \ldots c_{1} c_{0}}. It is clear that c2232c_{223} \geq 2. Moreover, if c223=2c_{223} = 2 then c222==c0=9c_{222} = \cdots = c_{0} = 9 and x=31022313101x = 3 \cdot 10^{223} - 1 \equiv 3 \cdot 10 - 1, and this is not divisible by 2009=72412009 = 7^{2} \cdot 41 since x1(mod7)x \equiv 1 \pmod{7}.

Now let c223=3c_{223} = 3. Then the number xx has the form 39998999=41022310i1399\ldots 9899\ldots 9 = 4 \cdot 10^{223} - 10^{i} - 1 for some ii. Since 1051(mod41)10^{5} \equiv 1 \pmod{41}, we have 10i1,10,18,1610^{i} \equiv 1, 10, 18, 16 or 37(mod41)37 \pmod{41} for i=0,1,2,3,4(mod5)i = 0, 1, 2, 3, 4 \pmod{5} respectively, and from this x410310i12210i(mod41)x \equiv 4 \cdot 10^{3} - 10^{i} - 1 \equiv 22 - 10^{i} \pmod{41} is never divisible by 4141.

Let c223=4c_{223} = 4. Among the digits c222,,c0c_{222}, \ldots, c_{0} there are either two eights or one seven, while all the others are nines; in every case, x=51022310i10j138(10i+10j)(mod41)x = 5 \cdot 10^{223} - 10^{i} 10^{j} - 1 \equiv 38 - (10^{i} + 10^{j}) \pmod{41}, where ii and jj are not necessarily distinct. By the previous, 10i+10j38(mod41)10^{i} + 10^{j} \equiv 38 \pmod{41} if and only if (i,j)(0,4)(i, j) \equiv (0, 4) or (4,0)(mod5)(4, 0) \pmod{5}. Among other things, iji \neq j and i,j220i, j \leq 220.

Let us try setting j=220j = 220 and i4(mod5)i \equiv 4 \pmod{5}. We need to choose ii, if it exists, so that 72x=5102231022010i151013101010i13110i(mod49)7^{2} \mid x = 5 \cdot 10^{223} - 10^{220} - 10^{i} - 1 \equiv 5 \cdot 10^{13} - 10^{10} - 10^{i} - 1 \equiv 31 - 10^{i} \pmod{49}. We easily find that 10i31(mod49)10^{i} \equiv 31 \pmod{49} if and only if i7(mod42)i \equiv 7 \pmod{42}, which together with i4(mod5)i \equiv 4 \pmod{5} gives as the only possibility i=49i = 49. Therefore, the desired number is

4998999170899949. 4998\underbrace{9 \ldots 99}_{170}8\underbrace{99 \ldots 9}_{49}.

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 translated into English from sr; metadata (topic, difficulty) added by this project.