Maths Olympiad Prep

Library / /20 of 57

, 2008

Number theory Difficulty 5.5 AIME, harder Prove it JBMO

Problem:
Determine the greatest number with nn digits in the decimal representation which is divisible by 429429 and has the sum of all digits less than or equal to 1111.

Solution

Solution:
Let A=anan1a1A = \overline{a_n a_{n-1} \ldots a_1} and notice that 429=31113429 = 3 \cdot 11 \cdot 13.

Since the sum of the digits ai11\sum a_i \leq 11 and ai\sum a_i is divisible by 33, we get ai=3,6\sum a_i = 3, 6 or 99. As 1111 divides AA, we have
11anan1+an2an3+ 11 \mid a_n - a_{n-1} + a_{n-2} - a_{n-3} + \ldots
in other words 11i oddaii evenai11 \mid \sum_{i \text{ odd}} a_i - \sum_{i \text{ even}} a_i. But
9aii oddaii evenaiai9 -9 \leq -\sum a_i \leq \sum_{i \text{ odd}} a_i - \sum_{i \text{ even}} a_i \leq \sum a_i \leq 9
so i oddaii evenai=0\sum_{i \text{ odd}} a_i - \sum_{i \text{ even}} a_i = 0. It follows that ai\sum a_i is even, so ai=6\sum a_i = 6 and i oddai=i evenai=3\sum_{i \text{ odd}} a_i = \sum_{i \text{ even}} a_i = 3.

The number 1313 is a divisor of 10011001, hence
13a3a2a1a6a5a4+a9a8a7a12a11a10+ 13 \mid \overline{a_3 a_2 a_1} - \overline{a_6 a_5 a_4} + \overline{a_9 a_8 a_7} - \overline{a_{12} a_{11} a_{10}} + \ldots
For each k=1,2,3,4,5,6k = 1, 2, 3, 4, 5, 6, let sks_k be the sum of the digits ak+6m,m0a_{k+6m}, m \geq 0; that is
s1=a1+a7+a13+ and so on.  s_1 = a_1 + a_7 + a_{13} + \ldots \text{ and so on. }
With this notation, (1) rewrites as
13100(s3s6)+10(s2s5)+(s1s4), or 134(s6s3)+3(s5s2)+(s1s4) 13 \mid 100(s_3 - s_6) + 10(s_2 - s_5) + (s_1 - s_4), \text{ or } 13 \mid 4(s_6 - s_3) + 3(s_5 - s_2) + (s_1 - s_4)
Let S3=s3s6S_3 = s_3 - s_6, S2=s2s5S_2 = s_2 - s_5, and S1=s1s4S_1 = s_1 - s_4. Recall that i oddai=i evenai\sum_{i \text{ odd}} a_i = \sum_{i \text{ even}} a_i, which implies S2=S1+S3S_2 = S_1 + S_3. Then
134S3+3S2S1=7S3+2S11349S3+14S113S13S3 13 \mid 4S_3 + 3S_2 - S_1 = 7S_3 + 2S_1 \Rightarrow 13 \mid 49S_3 + 14S_1 \Rightarrow 13 \mid S_1 - 3S_3
Observe that S1s1=i oddai=3|S_1| \leq s_1 = \sum_{i \text{ odd}} a_i = 3 and likewise S2,S33|S_2|, |S_3| \leq 3. Then 13<S13S3<13-13 < S_1 - 3S_3 < 13 and consequently S1=3S3S_1 = 3S_3. Thus S2=4S3S_2 = 4S_3 and S23|S_2| \leq 3 yields S2=0S_2 = 0 and then S1=S3=0S_1 = S_3 = 0. We have s1=s4s_1 = s_4, s2=s5s_2 = s_5, s3=s6s_3 = s_6 and s1+s2+s3=3s_1 + s_2 + s_3 = 3, so the greatest number AA is 3003000030030000\ldots.

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.