Olympiad Maths Prep

Library / /40 of 55

Number theory Difficulty 6.4 National olympiad Prove it 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.

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.

Looking for a route rather than 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 and solution reproduced as published; topic and difficulty added by this site.