For each \(1\leq i\leq 9\) and \(T\in\mathbb N\), define \(d_i(T)\) to be the total number of times the digit \(i\) appears when all the multiples of \(1829\) between \(1\) and \(T\) inclusive are written out in base \(10\).
Show that there are infinitely many \(T\in\mathbb N\) such that there are precisely two distinct values among \(d_1(T)\), \(d_2(T)\), \(\dots\), \(d_9(T)\).
Let \(n:=1829\). First, we choose some \(k\) such that \(n \mid 10^{k}-1\). For instance, any multiple of \(\varphi(n)\) would work since \(n\) is coprime to \(10\). We will show that either \(T=10^{k}-1\) or \(T=10^{k}-2\) has the desired property, which completes the proof since \(k\) can be taken to be arbitrary large.
For this it suffices to show that \(\#\left\{d_{i}\left(10^{k}-1\right): 1 \leqslant i \leqslant 9\right\} \leqslant 2\). Indeed, if
\[\#\left\{d_{i}\left(10^{k}-1\right): 1 \leqslant i \leqslant 9\right\}=1\]
then, since \(10^{k}-1\) which consists of all nines is a multiple of \(n\), we have\[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 \(#\left{d_{i}\left(10^{k}-2\right): 1 \leqslant i \leqslant 9\right}=2\). To prove that \(#\left{d_{i}\left(10^{k}-1\right)\right} \leqslant 2\) we need an observation. Let \(\overline{a_{k-1} a_{k-2} \ldots a_{0}} \in\left{1, \ldots, 10^{k}-1\right}\) be the decimal expansion of an arbitrary number, possibly with leading zeroes. Then \(\overline{a_{k-1} a_{k-2} \ldots a_{0}}\) is divisible by \(n\) if and only if \(\overline{a_{k-2} \ldots a_{0} a_{k-1}}\) is divisible by \(n\). Indeed, this follows from the fact that\[10 \cdot \overline{a_{k-1} a_{k-2} \ldots a_{0}}-\overline{a_{k-2} \ldots a_{0} a_{k-1}}=\left(10^{k}-1\right) \cdot a_{k-1}\]
is divisible by \(n\). This observation shows that the set of multiples of \(n\) between 1 and \(10^{k}-1\) is invariant under simultaneous cyclic permutation of digits when numbers are written with leading zeroes. Hence, for each \(i \in{1, \ldots, 9}\) the number \(d_{i}\left(10^{k}-1\right)\) is \(k\) times larger than the number of \(k\) digit numbers which start from the digit \(i\) and are divisible by \(n\). Since the latter number is either \(\left\lfloor 10^{k-1} / n\right\rfloor\) or \(1+\left\lfloor 10^{k-1} / n\right\rfloor\), we conclude that \(#\left{d_{i}\left(10^{k}-1\right)\right} \leqslant 2\). **Comment.** More careful analysis shows that \(#\left{d_{i}\left(10^{k}-1\right): 1 \leqslant i \leqslant 9\right}=1\) if and only if \(n \equiv 1\) \((\bmod 10)\), which is not the case for \(n=1829\).