Number theoryDifficulty 5.1AIME, harderProve itSerbia
Problem:
Determine the smallest natural number which is divisible by 2009 and whose digit sum equals 2009.
Solution
Solution:
Since 2009=223⋅9+2, the desired number has at least 224 digits. We shall consider 224-digit numbers x=c223c222…c1c0. It is clear that c223≥2. Moreover, if c223=2 then c222=⋯=c0=9 and x=3⋅10223−1≡3⋅10−1, and this is not divisible by 2009=72⋅41 since x≡1(mod7).
Now let c223=3. Then the number x has the form 399…9899…9=4⋅10223−10i−1 for some i. Since 105≡1(mod41), we have 10i≡1,10,18,16 or 37(mod41) for i=0,1,2,3,4(mod5) respectively, and from this x≡4⋅103−10i−1≡22−10i(mod41) is never divisible by 41.
Let c223=4. Among the digits c222,…,c0 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), where i and j are not necessarily distinct. By the previous, 10i+10j≡38(mod41) if and only if (i,j)≡(0,4) or (4,0)(mod5). Among other things, i=j and i,j≤220.
Let us try setting j=220 and i≡4(mod5). We need to choose i, if it exists, so that 72∣x=5⋅10223−10220−10i−1≡5⋅1013−1010−10i−1≡31−10i(mod49). We easily find that 10i≡31(mod49) if and only if i≡7(mod42), which together with i≡4(mod5) gives as the only possibility i=49. Therefore, the desired number is
49981709…9984999…9.
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.