Maths Olympiad Prep

Library / Serbian Mathematical Olympiad /8 of 80

Serbian Mathematical Olympiad

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=223⋅9+22009 = 223 \cdot 9 + 2, the desired number has at least 224224 digits. We shall consider 224224-digit numbers x=c223c222…c1c0‾x = \overline{c_{223} c_{222} \ldots c_{1} c_{0}}. It is clear that c223≥2c_{223} \geq 2. Moreover, if c223=2c_{223} = 2 then c222=⋯=c0=9c_{222} = \cdots = c_{0} = 9 and x=3⋅10223−1≡3⋅10−1x = 3 \cdot 10^{223} - 1 \equiv 3 \cdot 10 - 1, and this is not divisible by 2009=72⋅412009 = 7^{2} \cdot 41 since x≡1(mod7)x \equiv 1 \pmod{7}.

Now let c223=3c_{223} = 3. Then the number xx has the form 399…9899…9=4⋅10223−10i−1399\ldots 9899\ldots 9 = 4 \cdot 10^{223} - 10^{i} - 1 for some ii. Since 105≡1(mod41)10^{5} \equiv 1 \pmod{41}, we have 10i≡1,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 x≡4⋅103−10i−1≡22−10i(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=5⋅10223−10i10j−1≡38−(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+10j≡38(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, i≠ji \neq j and i,j≤220i, j \leq 220.

Let us try setting j=220j = 220 and i≡4(mod5)i \equiv 4 \pmod{5}. We need to choose ii, if it exists, so that 72∣x=5⋅10223−10220−10i−1≡5⋅1013−1010−10i−1≡31−10i(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 10i≡31(mod49)10^{i} \equiv 31 \pmod{49} if and only if i≡7(mod42)i \equiv 7 \pmod{42}, which together with i≡4(mod5)i \equiv 4 \pmod{5} gives as the only possibility i=49i = 49. Therefore, the desired number is

49989…99⏟170899…9⏟49. 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,604 problems in a working order, from Junior Challenge 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.