# Digit counts in the multiples of $n$

Let $n\geq 1$ be a natural number. We are to consider all the positive multiples of $n$ and count how many times the digit $d$ appears in each. We define this sequence

$$c_{n, d}(k) = \text{the number of times the digit }d \text{ appears in (the decimal expansion of) } kn$$

Are there any theorems or conjectures concerning this sequence $c(n)$? In particular, will it always contain every natural number?

Another question:

If we cut the sequence $c$ at $M$ and count the distribution of numbers

$$c(1), c(2), \dots, c(M)$$

what can be said about this distribution? Does it have some sort of limiting behavior as $M \to \infty$?
For example, when $n=2$ and $M=100000$ I calculated the following amounts

d: number of times $c_{2,d}(j)=k$
0: {0: 55768,1: 35038, 2: 8226, 3: 918, 4: 49, 5: 1}
1: {0: 32805, 1: 47385, 2: 17010, 3: 2610, 4: 185, 5: 5}
2: {0: 52488, 1: 36450, 2: 9720, 3: 1260, 4: 80, 5: 2}
3: {0: 65610, 1: 29160, 2: 4860, 3: 360, 4: 10}
4: {0: 52488, 1: 36450, 2: 9720, 3: 1260, 4: 80, 5: 2}
5: {0: 65610, 1: 29160, 2: 4860, 3: 360, 4: 10}
6: {0: 52488, 1: 36450, 2: 9720, 3: 1260, 4: 80, 5: 2}
7: {0: 65610, 1: 29160, 2: 4860, 3: 360, 4: 10}
8: {0: 52488, 1: 36450, 2: 9720, 3: 1260, 4: 80, 5: 2}
9: {0: 65610, 1: 29160, 2: 4860, 3: 360, 4: 10}

My try to solve the question whether every natural number appears in the sequence $c_{n, d}$.

Consider the numbers $$\underset{t}{\underbrace{dd\dotsb d}}, \space \space \space \space t=1, 2, 3 \dots$$

Whenever two of them are the same modulo $n$ (and this will happen, because there are only $n$ equivalence classes $\mod n$ and infinitely many numbers to put in them) their difference, which is of the form

$$\underset{t_2-t_1}{\underbrace{dd\dotsb d}}\underset{t_1}{\underbrace{00\dotsb 0}}$$

will be a multiple of $n$. So we can find a multiple of $n$ with exactly $t_2-t_1$ digits $d$.

I find it "probable" that this will happen often with $t_2$ large and $t_1$ small to produce bigger and bigger values to the sequence $c_{n, d}$. But I don't know how to prove this. This wouldn't still prove that every number is there, but I think this too, is very probable.

• It's certainly not the case that $c_{n,d}(k)$ can take every possible value for every $n$; take $n=1000$, for example, for which $c_{1000,0}(k)$ never equals $0$, $1$, or $2$. – Greg Martin Feb 15 '18 at 17:36
• In general, once $k$ is large enough, all but the last several digits of $kn$ can take any values you want (simply because jumping from $kn$ to $kn+1$ won't be enough to change all but the last several digits). From this one can show that $c_{n,d}(k)$ is concentrated in the limit around $\frac 1d \frac{\log k}{\log d}$ (that is, the possible digits each occur with the same frequency in the limit). – Greg Martin Feb 15 '18 at 17:39