The most elementary logarithmic numeration system is defined as follow. Any random number $X \in [0, 1]$ can be represented uniquely as $$X=\log_3(A_1 + \log_3(A_2+\log_3 (A_3 + \cdots)))$$ with $A_k \in \{1, 2\}$ also a random variable if $X$ is a random variable. Let us introduce the sequence $X_n$ with $X_1=X$, as follows:

$$X_{n+1} = 3^{X_n}-A_n, \mbox{ with } A_n = 2 \mbox{ if } X_n\geq \log_3 2, \mbox{ and } A_n = 1 \mbox{ otherwise}.$$

The above formula allows you to compute the digits $A_1, A_2$ and so on. Also $X_n\in [0, 1]$. Assuming $X_1 = X$ is uniform on $[0, 1]$, I am interested in the following quantities:

  • $p_n = P(X_n < \log_3 2)$, and especially $p_\infty$.
  • $E(X_\infty^k)$, $k=1, 2, 3, 4$.
  • The limiting distribution of $X_n$ and whether it admits a
    non-singular density function.
  • $\lim_{n\rightarrow \infty}n\Big(E(X_n)-E(X_\infty)\Big)$

Any result, other than the ones I already discovered myself and listed in the next section, is welcome.

1. Theoretical results obtained so far

Probably the most fundamental theorem is this:

  • If $X_n\geq \log_3 2$ then $P(X_{n+1}\geq \alpha) = \frac{1}{1-p_n}P(X_n\geq \log_3(2+\alpha))$
  • If $X_n < \log_3 2$ then $P(X_{n+1}\geq \alpha) = \frac{1}{p_n}\Big[p_n -P(X_n\geq \log_3(1+\alpha))\Big]$

Thus $$P(X_{n+1}\geq\alpha) = p_n + P(X_n\geq \log_3(2+\alpha)) - P(X_n\leq \log_3(1+\alpha).$$ Here $\alpha\in[0, 1]$. Many simple results can be derived from this formula, in particular:

  • $P(X_2\leq\alpha)=\log_3\Big[\frac{1}{2}(1+\alpha)(2+\alpha)\Big]$
  • $p_2 = \log_3\Big[\frac{1}{2}(1+\log_3 2)(2+\log_3 2)\Big]$
  • $E(X_2) = \frac{2+\log 2}{\log 3} - 2$

and more generally formulas like these ones, for $n>1$:

$$P(X_n <\alpha) = -p_{n-1} -(n-1)\log_3 2 + \log_3 \prod_{i_1,\cdots,i_{n-1}} B_{i_1,\cdots,i_{n-1}}$$

$$p_n = -(n-1)\log_3 2 + \log_3 \prod_{i_1,\cdots,i_{n-1}} C_{i_1,\cdots,i_{n-1}}$$

with (for instance)

  • $A_{i_1,i_2,i_3} =\log_3(i_1+\log_3(i_2+(\log_3(i_3 +\alpha))), $
  • $C_{i_1,i_2,i_3} =\log_3(i_1+\log_3(i_2+(\log_3(i_3 +\log_3 2)))$.

All indexes $i_1,i_2,i_3$ and so on take only on two values: $1, 2$.

In short all the quantities of interest can be computed recursively. Note that these results are from me, if you see any error or typo, please let me know.

2. Distribution of $X_{\infty}$

It is very well approximated by $P(X_\infty <\alpha) \approx \sqrt{\alpha}$. Note that $\alpha\in [0,1]$. Below are the empirical percentile distributions for $X_1$ (uniform), $X_2, X_3$ and $X_{40}$.

enter image description here

Below is the error between the empirical distribution of $X_{40}$ and its approximation based on a square root distribution on $[0, 1]$:

enter image description here

This a remarkable chart. I had expected to be fractal-like, highly chaotic as this is the case for the nested square root system, see here.

3. Empirical results

The chart below shows convergence of the first four moments $M_1,\cdots, M_4$, as well as that of $p_n$, starting with $X_1 = X$ being uniform on $[0, 1]$.

enter image description here

And here is some source code for the various computations:

$m=40;           # X_1, ... X_m
$numbers=90000;  # sample size


for ($k=0; $k<$numbers; $k++) {

  if ($k % 100==0) { print "$k\n"; }

  $rand=3*$rand-int(3*$rand);  # uniform deviates

  for ($n=1; $n<=$m; $n++) {
    if ($z >= $lg ) { $digit=2; } else { $digit=1; } 
    $z2=$z*$z; ## to compute variance
    if ($n==40) { print OUT "$k\t$x\t$n\t$z\t$digit\t$z2\n"; }

    if ($digit==1) { $adigit[$n]++; }

    $z=3**$z - $digit;



  • 1
    $\begingroup$ I am also interested in asymptotic results or simple recurrence relations to compute the various quantities. $\endgroup$ Commented Apr 1, 2020 at 21:53
  • 1
    $\begingroup$ I would considere this much more mathematics than statistics, eventthough there is use of 'probability' the application is theoretic and not applied mathematics. $\endgroup$ Commented Apr 5, 2020 at 12:39
  • $\begingroup$ I hesitated posting it in math.stackexchange. Yes it is probabilistic number theory. $\endgroup$ Commented Apr 5, 2020 at 17:37

1 Answer 1


Your theoretical result is very straightforward. If we have

$$X_{n+1} = 3^{X_n} - A_n$$


$$P[X_{n+1} \geq \alpha] = P[3^{X_n}-A_n \geq \alpha] = P[X_n \geq \log_3(\alpha + A_n)] $$

and you can split up the condition $X_n \geq \log_3(\alpha + A_n)$ into conditional cases when $X_n \geq \log_3(2)$ and when $X_n < \log_3(2)$. This is a split up in regions.

$$\begin{array}{} P[X_{n+1} \geq \alpha] &=& P[X_n \geq \log_3(\alpha + A_n)] \\ &=& P[2 > X_n \geq \log_3(\alpha + 1)] + P[ X_n \geq \log_3(\alpha + 2) \geq \log_3(2)] \\ &=& \underbrace{P[2 > X_n \geq \log_3(\alpha + 1)]}_{X_n<2} + \underbrace{P[ X_n \geq \log_3(\alpha + 2)] \hphantom{\geq \log_3(2)}}_{X_n \geq 2} \end{array}$$

It might be interresting to consider the following continued logarithm:

$Y_n = \log_3(B_1 + \log_3(B_2 + \log_3(B_3 + ....)))$

where $B_i = A_i \text{ if } i \leq n$ and $B_i = 1 \text{ if } i > n$

and $Y_\infty$ has all $B_i = A_i$ and equals $X$.

The $Y_n$ are like the $Y_\infty$ but with the digits above $n$ removed. Your $X_n$ is an expression for the difference between $Y_n$ and $Y_\infty$, but taken to the power 3 repeated $n$ times.

Then $$X_n = 3^{3^{3^{\dots (Y_{\infty})}}}-3^{3^{3^{\dots (Y_{n})}}} = \log_3(A_{n+1}+\log_3(A_{n+2}+\log_3(A_{n+3}+ \dots)))$$

Inspired by that you could also find the coordinates $A_i$ or $B_i$ by slicing the section $[0,1]$ into pieces according to numbers $Y_n$

split up

It seems like the probability for the digit $P(A_n = 2)$ (the gray sections) decreases as $n$ is increasing, but the rate of decrease is slowing down for larger $n$.

For $n=16$, I computed the $Y_n$ for all possible $A_1, ... , A_n$. Based on that I computed the first $p_n$ and this gave on a log-log plot the following:


Do we have $\lim_{n \to \infty} p_n = 0$ ?

What we see is that everytime these sections are getting split up into a black and a gray section. What is the fraction of gray for each split?

I am taking some jump and pose that

  • the right section is the one that gets split into the largest part gray. The point of split $z_n$ follows

    $$z_{n+1} = \log_3(2+z_n)$$

    with $z_1 = \log_3(2)$

    The fraction of gray is $f(z_n) = (1-z_{n+1})/(1-z_n)$. This gives more generally as a function of $q=1-z$

    $$f(q) = \frac{1-\log_3(3-q)}{q} \underbrace{ \approx \frac{\frac{1}{\log(27)}q }{q} }_{\text{Taylor series approximation}} \underbrace{\approx \frac{1}{\log(27) }\approx 0.3034}_{\lim q \to 0}$$

  • the left section is the one that gets split into the smallest part gray. The point of split $z_n$ follows

    $$z_{n+1} = \log_3(1+z_n)$$

    with $z_1 = \log_3(2)$

    The fraction of gray is $f(z_n) = 1 - z_{n+1}/z_n$. This gives more generally as a function of $q=z$

    $$f(q) = 1 - \frac{\log_3(1+q)}{q} \underbrace{ \approx 1- \frac{\frac{1}{\log(3)}q }{q} }_{\text{Taylor series approximation}} \underbrace{\approx 1-\frac{1}{\log(3) }\approx 0.0898}_{\lim q \to 0}$$

So we get

$$ 0.0897 < p_{\infty} < 0.3035 $$

The same technique can be used to refine the bounds by going further down the tree instead of just using the left most and right most sections. For the moment I do not see a more intelligent way to find bounds for $p_\infty$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.