Maths Olympiad Prep

Track / Stage 8 / 121 of 180 #1821 of 1964

Problem 1821

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.4 Prove it International Mathematical Olympiad · IMO

For each 1i91 \leqslant i \leqslant 9 and TNT \in \mathbb{N}, define di(T)d_{i}(T) to be the total number of times the digit ii appears when all the multiples of 18291829 between 11 and TT inclusive are written out in base 1010.
Show that there are infinitely many TNT \in \mathbb{N} such that there are precisely two distinct values among d1(T),d2(T),,d9(T)d_{1}(T), d_{2}(T), \ldots, d_{9}(T).

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.

Official solution

Let n:=1829n := 1829. First, we choose some kk such that n10k1n \mid 10^{k} - 1. For instance, any multiple of φ(n)\varphi(n) would work since nn is coprime to 1010. We will show that either T=10k1T = 10^{k} - 1 or T=10k2T = 10^{k} - 2 has the desired property, which completes the proof since kk can be taken to be arbitrarily large.

For this it suffices to show that #{di(10k1):1i9}2\#\left\{ d_{i}\left(10^{k} - 1\right) : 1 \leqslant i \leqslant 9 \right\} \leqslant 2. Indeed, if
#{di(10k1):1i9}=1 \#\left\{ d_{i}\left(10^{k} - 1\right) : 1 \leqslant i \leqslant 9 \right\} = 1
then, since 10k110^{k} - 1 which consists of all nines is a multiple of nn, we have
di(10k2)=di(10k1) for i{1,,8}, and d9(10k2)<d9(10k1) d_{i}\left(10^{k} - 2\right) = d_{i}\left(10^{k} - 1\right) \text{ for } i \in \{1, \ldots, 8\}, \text{ and } d_{9}\left(10^{k} - 2\right) < d_{9}\left(10^{k} - 1\right)
This means that #{di(10k2):1i9}=2\#\left\{ d_{i}\left(10^{k} - 2\right) : 1 \leqslant i \leqslant 9 \right\} = 2.

To prove that #{di(10k1)}2\#\left\{ d_{i}\left(10^{k} - 1\right) \right\} \leqslant 2 we need an observation. Let ak1ak2a0{1,,10k1}\overline{a_{k-1} a_{k-2} \ldots a_{0}} \in \{1, \ldots, 10^{k} - 1\} be the decimal expansion of an arbitrary number, possibly with leading zeroes. Then ak1ak2a0\overline{a_{k-1} a_{k-2} \ldots a_{0}} is divisible by nn if and only if ak2a0ak1\overline{a_{k-2} \ldots a_{0} a_{k-1}} is divisible by nn. Indeed, this follows from the fact that
10ak1ak2a0ak2a0ak1=(10k1)ak1 10 \cdot \overline{a_{k-1} a_{k-2} \ldots a_{0}} - \overline{a_{k-2} \ldots a_{0} a_{k-1}} = (10^{k} - 1) \cdot a_{k-1}
is divisible by nn.

This observation shows that the set of multiples of nn between 11 and 10k110^{k} - 1 is invariant under simultaneous cyclic permutation of digits when numbers are written with leading zeroes. Hence, for each i{1,,9}i \in \{1, \ldots, 9\} the number di(10k1)d_{i}\left(10^{k} - 1\right) is kk times larger than the number of kk digit numbers which start from the digit ii and are divisible by nn. Since the latter number is either 10k1/n\left\lfloor 10^{k-1} / n \right\rfloor or 1+10k1/n1 + \left\lfloor 10^{k-1} / n \right\rfloor, we conclude that #{di(10k1)}2\#\left\{ d_{i}\left(10^{k} - 1\right) \right\} \leqslant 2.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.