Maths Olympiad Prep

Track / Stage 6 / 257 of 400 #1737 of 2444

Problem 1737

National Olympiad, first round
Number theory Difficulty 6.4 Prove it Ukrainian National Mathematical Olympiad · Ukraine

Find the average of all 5-digit numbers that satisfy the following:
* The number is of the form ab0cd\overline{ab0cd}, that is, its third digit is zero;
* Digits are pairwise distinct;
* Both numbers ab0cd\overline{ab0cd}, and dc0ba\overline{dc0ba} are divisible by 7.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Let us rewrite the problem the following way: since 10011001 is divisible by 77, then
ab0cd=1000ab+cd=1001ab+(cdab)(cdab) is divisible by 710(ca)+(db) is divisible by 73(ca)+(db) is divisible by 7. \begin{align*} \overline{ab0cd} &= 1000 \cdot \overline{ab} + \overline{cd} = 1001 \cdot \overline{ab} + (\overline{cd} - \overline{ab}) \\ &\Rightarrow (\overline{cd} - \overline{ab}) \text{ is divisible by } 7 \\ &\Rightarrow 10(c-a) + (d-b) \text{ is divisible by } 7 \\ &\Rightarrow 3(c-a) + (d-b) \text{ is divisible by } 7. \end{align*}

Similarly, 3(db)+(ac)3(d-b)+(a-c) must be divisible by 77. Thus, 3x+y=7k3x+y=7k and 3y+x=7l9x+3y=21k8x=7(3kl)x3y+x=7l \Rightarrow 9x+3y=21k \Rightarrow 8x=7(3k-l) \Rightarrow x is divisible by 77, and similarly yy is divisible by 77. Therefore, there exist two pairs of nonzero digits, difference of which is divisible by 77. There are two such pairs: (8,1)(8, 1) and (9,2)(9, 2). Clearly, the pair (7,0)(7, 0) is not considered, since it contains zero, that already is one of the digits of the number. So, there are eight numbers that satisfy the conditions: 1208912089, 1908219082, 2109821098, 2809128091, 8901289012, 8201982019, 9802198021 and 9102891028. Their average equals 5505555055.

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