Problem

Source: ISL 2022 N5

Tags: number theory, IMO Shortlist, AZE IMO TST



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)$.