Given a strictly positive real number $x$ we set $e(x)=\log(1+x)$ if $x$ is an integer and $$e(x)=\log(1+x)+\frac{1+\lbrace x\rbrace}{1+x}\left(e(1/\lbrace x\rbrace)-\log(1+\lbrace x\rbrace)\right)$$ otherwise (i.e. if the fractional part $\lbrace x\rbrace$ of $x$ is strictly positive).

This defines $e(x)$ if $x$ is rational and the recursive definition of $e(x)$ yields its value as a (perhaps infinite) limit if $x$ is irrational.

The real number $e(x)$ can be interpreted as an entropy (or information content) as follows: Consider the segment $[-1,x]$ endowed with the uniform probability law. Apply to the positive and to the negative part of this segment iteratedly the Euclidean Algorithm (removing from the longer piece a segment of length the length of the shorter piece). This yields a partition of $[-1,x]$ into finitely many segments if $x$ is rational and into infinitely many segments accumulating at the origin otherwise. The function $e(x)$ is simply a normalized entropy of this partition ($e(x)$ is essentially the expected amount of information on the position of a random point on $[-1,x]$ which can be inferred when only knowing the interval containing the random point).

We illustrate this with $x=5/19$. We start with the interval $[-1,5/19]$. Since only proportions matter, we replace it by $[-19,5]$ in order to work over $\mathbb Z$. The positive interval $[0,5]$ is shorter than the negative interval $[-19,0]$. We therefore cut a piece of length $5$ from the negative interval in order to get $[-14,5]$. Iteration yields then $[-9,5]$ and $[-4,5]$. At this point the negative interval is shorter and we get therefore $[-4,1]$. The positive interval $[0,1]$ is now shortest leading to $[-3,1],[-2,1],[-1,1]$ and finally $[ 0,1]$. We get therefore the partition of $[-19,5]$ into intervals $[-19,-14],[-14,-9],[-9,-4],[-4,-3],[-3,-2],[-2,-1],[-1,0],[0,1],[1,5]$. Endowing the interval $[-19,5]$ with the uniform probability measure $\mu$ (with probability of an interval given by its length divided by the total length $19+5=24$) the topological entropy of this partition is given by $$e(5/19)=-\frac{1}{24}(5\log(5/24)+5\log(5/24)+5\log(5/24)+5\cdot 1\log(1/24)+4\log(4/24))$$ and gives the expected amount of information (up to $\log(2)$ when working with bits, I guess) encoded by the partition.

A few easy facts:

$e(x)=e(1/x)$ (obvious from the definition).

$e(x)$ is discontinous at every rational value (it is in fact unbounded in the neighbourhood of a rational value) but should be continuous on a set of full measure. $e(x)$ is infinite at some irrational values with very huge coefficients in their continued fraction expansion.

The graph of $e(x)$ is a beautiful fractal.

The function $x\longmapsto e(x)$ is probably locally integrable.

It would be somewhat surprising if nobody has ever looked at this notion.

Are there paper, references etc. on this notion?

  • 1
    $\begingroup$ Could you be more specific concerning the definition of the partitions you are talking about? What is this partition already for an integer $x$? What do you mean by "a normalized entropy"? $\endgroup$
    – R W
    Oct 22, 2022 at 14:45
  • 1
    $\begingroup$ @RW Thanks for your input. I have added a hopefully helpful example. $\endgroup$ Oct 22, 2022 at 15:12
  • 1
    $\begingroup$ Thank you - it's clearer now. Since you have already mentioned continued fractions, could you describe your partition directly in terms of the contiued fraction decomposition of $x$? $\endgroup$
    – R W
    Oct 22, 2022 at 15:51
  • $\begingroup$ @RW yes, I can but it is slightly indirect and involves all convergents and semi-convergents. This question arose from this description but I wanted it to be not too long. $\endgroup$ Oct 22, 2022 at 16:05

1 Answer 1


Below is a graph of $e(x)$. Precisely, the $y$-value associated with the given $x$-value is $y = e(x/70009)$.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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