Let $\alpha\in[0,9].$ Is the set of real numbers such that the average of the digits of each of these numbers $=\alpha,$ countable or uncountable

decimal-expansionreal numbersreal-analysissequences-and-series

Let $\alpha \in [0,9]\subset\mathbb{R}.$ Is the following set countable or uncountable:

The set of all (nonnegative) real numbers which, when written in decimal expansion form

$$k_1\ldots k_m\cdot k_{m+1}\ldots$$

where the $k_i$ are digits between $0$ and $9$, satisfy

$$\lim_{n\to\infty}\left( \frac{\sum_{j=1}^n k_j}{n} \right) = \alpha ?$$

Best Answer

  1. There are uncountably many numbers with $\alpha = 0$.

Let $\{a_n\}$ be a strictly increasing sequence of natural numbers. For each sequence, we'll build a number with $\alpha=0$. Since there are uncountably many such sequences (in particular, the set of sequences s.t. $a_{n+1} = a_n + 1$ or $a_{n+1} = a_n + 2$ is uncountable), we can generate uncountably many numbers.

Let $s_n = \sum_{i=1}^n a_i$. Let $x$ be the number such that its $i$'th digit $x_i = 1$ iff $i = s_n$ for some $n$, and $x_i=0$ otherwise.

Then $\alpha(x) = 0$. It suffices to show that $\lim \frac n {s_n} = 0$ (it's the average up to $s_n$'th digit). It follows from the fact that $a_n \ge n$ and therefore $s_n \ge \frac {n^2} 2$.

  1. There are uncountably many numbers for any $\alpha \in (0, 1)$. Handling $\alpha \ge 1$ is trivial (just add $\lfloor\alpha \rfloor$ to all digits).

Consider digits between $s_{n-1}$ and $s_{n}$, There are $a_n$ such digits. Let $c_n \in \mathbb N$ s.t. $\frac {c_n} {a_n}$ is the closest to $\alpha$. Let ${c_n}$ digits between $s_{n-1}$ and $s_n$ be $1$ and the rest of the digits be $0$, then the average of these digits is $\frac {c_n} {a_n}$.

Since $a_n$ strictly increases, $\lim \frac {c_n} {a_n} = \alpha$. Therefore, for any $\epsilon$ there exists $n_0$ s.t. $\frac {c_n} {a_n} \in [\alpha - \epsilon, \alpha + \epsilon]$ for $n \ge n_0$. Then the average up to $s_n$ is \begin{align*} avg_{s_n} &= \frac {c_1 + \cdots + c_n} {s_n}\\ &= \frac {c_1 + \cdots + c_{n_0}} {s_n} + \frac {c_{n_0 + 1} + \cdots + c_{n}} {s_n} \\ &= \frac {c_1 + \cdots + c_{n_0}} {s_n} - \alpha \frac {s_{n_0}} {s_n} + \frac {\alpha s_{n_0} + c_{n_0 + 1} + \cdots + c_{n}} {s_n} \\ &\to 0 + 0 + \ell \in [\alpha - \epsilon, \alpha + \epsilon], \end{align*} since $$\alpha s_{n_0} + c_{n_0 + 1} + \cdots + c_{n} \ge \alpha s_{n_0} + a_{n_0 + 1} (\alpha - \epsilon) + \cdots + a_{n}(\alpha - \epsilon) \ge \alpha s_n - \epsilon s_n$$ (the same for $\alpha+\epsilon$). Since this holds for arbitrary $\epsilon$, $\lim avg_n = \alpha$.

Some technicalities

  1. For the limit to exist, we also need to consider all $n' \in [s_{n-1}, s_n]$. It suffices to guarantee that $a_n = o(s_{n-1})$, and I gave an example of such a family of sequences above.
  2. For $\alpha \in (0,1)$, I don't actually guarantee that the generated numbers are distinct. We can guarantee this with some adjustments, but it's simpler to do the following: generate one number, and then change its $s_n$'th digits to be either $0$ or $1$ (all combinations). As shown in the case $\alpha = 0$, it doesn't change the limit of the average.
Related Question