Problem

Source: Malaysian SST 2024 P2

Tags: number theory, Digits



A finite sequence of decimal digits from $\{0,1,\cdots, 9\}$ is said to be common if for each sufficiently large positive integer $n$, there exists a positive integer $m$ such that the expansion of $n$ in base $m$ ends with this sequence of digits. For example, $0$ is common because for any large $n$, the expansion of $n$ in base $n$ is $10$, whereas $00$ is not common because for any squarefree $n$, the expansion of $n$ in any base cannot end with $00$. Determine all common sequences. Proposed by Wong Jer Ren