59

For some values of $x \in \mathbb{R}$, we can define what I'll call the "average digit" of $x$ and denote as $\theta(x)$ via

$$\theta(x) = \lim_{n \to \infty} \frac{a_1 + \dots + a_n}{n}$$

where the $a_i$ are the uniquely defined as digits in the decimal expansion of $x$, that is $x = N.a_1a_2\dots$, for some integer $N$, where we do not allow infinitely trailing $9$s (for example, for $x=1$, we have $a_i=0 \forall i$, rather than $a_i = 9 \forall i$. In other words, we are using that $1=1.000...$, not that $1 = 0.999...$)

This limit is well-defined since $\theta_n := \frac{a_1 + \dots + a_n}{n}$ is a Cauchy sequence. (it’s not, my mistake! Let’s just say:)

$\theta(x)$ is defined for whichever $x$ this limit exists.


Problem: I was wondering whether there are any fixed points of $\theta$. That is, is there some number which describes what its average digit is? Well, we of course have $\theta(0) = 0$, but is there anything else?

I've been playing around with this for a bit, and I think I might have found an irrational number which is a fixed point of $\theta$. Intuitively it seems like it has to be, but I need to do a little more to prove it rigorously - hence the question. (N.B. its possible to show that all non-zero fixed points of $\theta$ are irrational, see this question.)

Here's the formal definition of the number:

Define $a_1 = 1$, $x_1 = \frac{1}{10}$ and, recursively for all $i > 1$, $a_i = \begin{cases}1 & \frac{a_1 + \dots + a_{i-1} + 0}{i} < x_{i-1} \\ 0 & \text{otherwise}\end{cases}$, $x_i = x_{i-1} + \frac{a_i}{10^i}$.

Then $x_i$ is increasing and bounded above (by $1$, say) so $x_i \to x$. $x$ is my number which I think obeys $\theta(x) = x$.

Intuitively, what we're actually doing here in this number's definition is the following: if we have some sequence of decimal digits $(a_i)$ of a real number $x$, we can define approximations $x_n = \sum_{i=1}^n \frac{a_i}{10^i}$, and $\theta_n = \sum_{i=1}^n \frac{a_i}{n}$ which will converge to $x$ and $\theta(x)$ respectively. We observe that if $a_n = 0$, then $x_n = x_{n-1}$ but $\theta_n < \theta_{n-1}$. So, if our integers $a_n$ are mostly zeroes, the $x_n$s will often stay constant for several terms in the sequence while the $\theta_n$s decrease slightly. Whenever $\theta_n$ drops below $x_n$, we'll insert a $1$ into the sequence to "correct course" and keep the $(\theta_n)$ sequence above the $(x_n)$ sequence.

The integers $i$ for which $a_i = 1$ are $1, 11, 20, 30, 40, 50, 60, 70, 80, 90, 100, \dots$. You can find these integers as a sequence $p_k$ by recursively defining $p_1 = 1$, $p_k = \min(n \in \mathbb{N} : \frac{k-1}{n} < \sum_{i=1}^{k-1} \frac{1}{10^{p_i}})$. As you can see the terms of $a_i$ quickly turn into successive multiples of $10$, and so we can approximate

$$x \approx \frac{1}{10} + \frac{1}{10^{11}} + \sum_{k=2}^{\infty} \frac{1}{10^{10k}} = 0.10000000001\overline{0000000010}.$$

This rational on the right-hand side has $\theta(x) = \frac{1}{10} \approx x$.

The sequence $p_k$ isn't going to be multiples of $10$ forever though - eventually this will break and instead of getting a rational with period $10$ with an "average digit" of $\frac{1}{10}$, we'll get a rational with period $10^{11}$ with an "average digit" of $\frac{1}{10} + \frac{1}{10^{11}}$, and so on.

What I've thus got from this recursive definition is that these $a_i$s define a sequence $x_n \to x$, with $\theta(x_n) \to x$. The only bit missing is that I'd like to say $\lim_{n \to \infty} \theta(x_n) = \theta(x)$.

What I'm not sure how to formally codify the fact that we are inserting $1$s near-periodically (we've already seen that $x \approx \frac{1}{10} + \frac{1}{10^{11}} + \sum_{k=2}^{\infty} \frac{1}{10^{10k}} = 0.10000000001\overline{0000000010}.$, and that this approximation is very good) and we are inserting these $1$s at a frequency that happens to agree with the earlier parts of $x$ that we've already written down. If we can express the intuitive idea here formally, I think that's what will allow us to prove that $\theta(x)=x$.

I might have just been staring at this for too long and gotten tired, but I can't make progress on this last bit. Can anyone see what we need to do here?

Of course, if I'm wrong and this number isn't a fixed point of $\theta$, explaining what's gone wrong here would also be a valid answer. Perhaps you can show $0$ is the only fixed point of $\theta$, that would certainly be a valid answer also.)

Bill Dubuque
  • 282,220
Robin
  • 6,201
  • Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed. – Shaun Apr 18 '25 at 10:45
  • 2
    I posted your question in a Discord server, and someone replied with an entire PDF. Thought you might want to take a look: https://ivory-arlen-13.tiiny.site. Not sure if it clears up all your doubts, but it’s worth checking out – Martin.s May 11 '25 at 09:12

2 Answers2

42

The fixed points of $\theta$ are actually an uncountable, dense, measure $0$ subset of $(0,9)$. This shouldn't be a surprise because $\theta$ sends every open interval surjectively to $[0,9]$.

Let $S = \{x\in(0,9) \mid \theta(x)=x\}$. That $S$ has measure $0$ is obvious, since the set of points such that $\theta(x) = 4.5$ has full measure. The method of proof of the other properties is inspired by Riemann's paradox.

Theorem: For each $x\in(0,9)$ and $\epsilon>0$, the set $S\cap (x-\epsilon,x+\epsilon)$ is uncountable.

Proof: Fix $x_0\in(0,9)$ and $\epsilon>0$. We will show that for each $s\in(0,1)$, there is a distinct point in $x_s \in S\cap(x_0-\epsilon,x_0+\epsilon)$. We will construct a sequence $x_n$ such that $\lim\limits_{n\rightarrow \infty} x_n = x_s$ and $\theta(x_s) = x_s$.

Let $d_n$ be the $n$th digit of $x_0$, and let $s_n$ be the $n$th digit of $s$, and let $N=\lceil -\log_{10}\epsilon\rceil$. For $n\ge 1$, we'll define $x_n$ as follows:$$ x_n = a_{0}.a_{1}a_{2}a_{3}\dots a_n = \sum_{k=0}^n \frac{a_{k}}{10^k} $$ where $a_{k}$ are defined as: $$ a_n = \begin{cases} d_n & n \le N\\ s_k & n > N \text{ and }n = 2^k+N\text{ for some }k\ge 0\\ 9 & \theta_{n-1}(x_{n-1}) < x_{n-1}\\ 0 & \theta_{n-1}(x_{n-1}) > x_{n-1} \end{cases} $$ Obviously, $x_n$ converges in the limit, and we'll call the limit $x_s$. We also have that for any $s,s'\in(0,1)$, $x_s\ne x_{s'}$, and that $|x_s - x_0| <\epsilon$. Then, all that remains to show is that $\theta(x_s) = x_s$. Note that $\theta_n(x_n) = \theta_n(x_s)$. Thus, it suffices to show that $\theta_n(x_n)$ converges to $x_s$. We will show this by showing that $$ \Delta_n = \theta_n(x_n) - x_n $$ decreases to $0$. Note that $$ \theta_n(x_n) = \frac{a_1+\cdots + a_n}{n} = \frac{a_1+\cdots + a_{n-1}}{n} + \frac{a_n}{n} = \frac{n-1}n \theta_{n-1}(x_{n-1}) + \frac{a_n}{n} $$ and $x_n = x_{n-1} + \frac{a_n}{10^n}$. Then \begin{eqnarray} \Delta_n &=& \frac{n-1}n \theta_{n-1}(x_{n-1}) + \frac{a_n}{n} - x_{n-1} - \frac{a_n}{10^n}\\ &=& \theta_{n-1}(x_{n-1}) - x_{n-1} - \frac1n\theta_{n-1}(x_{n-1}) + a_n\left(\frac1n - \frac{1}{10^n}\right) \\ &=& \Delta_{n-1} -\frac1n\theta_{n-1}(x_{n-1}) + a_n\left(\frac1n - \frac{1}{10^n}\right) \end{eqnarray}

From this, you can see clearly that $|\Delta_n - \Delta_{n-1}|$ goes to $0$. Furthermore, if $\Delta_{n-1} < 0$, by the definition of $a_n$, if $n$ is not $N+2^k$ for some $k$, we have $$ \Delta_n = \Delta_{n-1} + \frac1n\left(9-\theta_{n-1}(x_{n-1})-\frac{9n}{10^n}\right) $$ Hence for $n$ sufficiently large, $\Delta_{n-1}<0$ implies $\Delta_n>\Delta_{n-1}$. Similarly, if $n$ is sufficiently large and not $N+2^k$ for any $k$, then $\Delta_{n-1}>0$ implies $\Delta_n<\Delta_{n-1}$. Furthermore, note that \begin{eqnarray} \left|\Delta_n - \Delta_{n-1}\right| &=& \left|-\frac1n\theta_{n-1}(x_{n-1}) + a_n\left(\frac1n - \frac{1}{10^n}\right)\right| \\&=& \frac1n \left|-\theta_{n-1}(x_{n-1}) + a_n(1-\frac{n}{10^n})\right|\asymp \frac1n \end{eqnarray} because $\limsup\limits_{n\rightarrow\infty}\theta_{n-1}(x_{n-1}) < 9$ and $\liminf\limits_{n\rightarrow\infty}\theta_{n-1}(x_{n-1})>0$.

Then, let $n_j$ be the subsequence of numbers such that $\{n_j\} = \mathbb{N}\setminus\{N+2^k\mid k\in\mathbb{N}\}$. The set of $n = N+2^k$ is sparse enough that it will not affect the convergence of $\Delta_n$. The sequence $\Delta_{n_j}$ satisfies:

  1. $|\Delta_{n_{j-1}} - \Delta_{n_{j}}|$ goes to $0$.
  2. If $\Delta_{n_{j-1}} > 0$ then $\Delta_{n_{j}} < \Delta_{n_{j-1}}$ except when $n_j = N+2^k$ for some $k$.
  3. If $\Delta_{n_{j-1}} < 0$ then $\Delta_{n_{j}} > \Delta_{n_{j-1}}$ except when $n_j = N+2^k$ for some $k$.
  4. $\sum_j |\Delta_{n_{j-1}} - \Delta_{n_{j}}|$ diverges (which follows from the difference being asymptotically like $\frac1j$).

This implies that $\Delta_{n_j}$ converges to $0$, whence we get that $\Delta_n$ converges to $0$, and therefore $$ x_s = \lim\limits_{n\rightarrow\infty} x_n = \lim\limits_{n\rightarrow\infty} \theta_n(x_n) = \lim\limits_{n\rightarrow\infty} \theta_n(x_s) = \theta(x_s)$$ as desired. $\square$

I think this procedure shows how one could generate other fixed points as well.


Is $\theta$ actually well defined?

Actually, it is not always well-defined. There are numbers for which $\theta(x)$ does not converge. For instance, suppose for $n\ge 0$, we have $$ a_n = \begin{cases} 9 & n \in \{2^{2^{2k}}...2^{2^{2k+1}}-1\}\text{ for some }k\\ 0 & n \in \{2^{2^{2k+1}}...2^{2^{2k+2}}-1\}\text{ for some }k \end{cases} $$ If we evaluate $\theta_{2^{2^k}}(x)$ for even $k$, the result will approach $0$, while if we evaluate it at odd $k$, it approaches $9$. One could use similar trickery to, for any sequence of rational numbers $r_n$, generate a number $x$ such that $r_n$ is a subsequence of $\theta_n(x)$.

28

Fixed points of $\theta$ (other than zero) are not that hard to find. We construct one here using just the digits $1$ and $2$.

Start with $1.2$. The average of these digits exceeds the value of the number, so to bring the former down we insert $1$'s to the right until there are enough to pull the average digit below the value of the number (which turns out to be $1.2111$). Now append $2$'s until the average grows above the number value, then $1$'s until the average drops below, and continue. The difference between the average digit and the value of the number is bounded by $(2-1)/n$ where $n$ is the number of digits, so your result is convergent.

Using a MS Excel worksheet we render the first sixteen digits:

$1.211121111211112...$

Try it with other pairs of digits, for fun.

Oscar Lanzi
  • 48,208
  • single digit cases don't work since 2 is actually 2.00000000000... which brings down the average – Gabriel Tellez Apr 17 '25 at 02:18
  • 1
    You get an uncountable number of solutions by picking two consecutive integer digits l and r, any real number l < x < r, starting with l, adding r's until the average is > x, adding l's until the average is < x, and so on. – gnasher729 Apr 17 '25 at 14:34
  • 1
    Be careful here. The x value is not an independent variable. It must match the representation you generated, e.g. if you are using 1's and 2's and you have 1.211, you have to compare the average digit (here, 1.25) with the 1.211. It looks to me like you can get a countable infinity, but not an uncountable one unless you allow a third digit or use a different construction method. – Oscar Lanzi Apr 17 '25 at 16:05