I would like to know if I have discovered or merely rediscovered the following pretty fact.


A partition of $[0,1]$ into intervals of lengths $p\_{i, i=1\ldots n}$ induces a probability distribution with entropy $-\sum p\_i \log\_2 p\_i$; call this also the entropy of the partition.


For a given $n$, entropy gets maximized by the uniform partition, namely taking all the $p\_i$ equal to $1/n$.


Alternatively, one can generate a type of random partition by randomly sampling $n-1$ points according the uniform distribution on $[0,1]$, and then making the sampled points the endpoints of intervals.


The pretty fact: as $n$ grows large, the average amount by which the entropy of the uniform partition exceeds the entropy
of this sort of random partition tends to a limit with the simple expression $(1-\gamma)/\ln(2)=0.609948863612\ldots$.


**Question**: does this fact appear anywhere in the literature? (Also interested if it's a folk theorem.)



The Euler-Mascheroni constant and entropy
The earliest reference I have found for this result is [Entropy and maximal spacings for random partitions](https://link.springer.com/article/10.1007/BF00533604) (E. Slud, 1978).


Theorem 2.2 states that the entropy $W\_n=-\sum\_{i=1}^n p\_i \ln p\_i$ of the random partition is asymptotically normally distributed for $n\rightarrow \infty$ as ${\cal N}(\ln n +\gamma-1,\alpha\_n)$, with $\alpha\_n={\cal O}(1/n)$.  

(Note that $\ln n$ is the "maximal entropy" from the OP, with natural logarithms rather than base 2.)  

Theorem 2.3 then specifies that, almost surely as $n\rightarrow\infty$,
$$\ln n - W\_n=1-\gamma+{\cal O}\left(\sqrt{\frac{\ln\ln n}{n}}\right).$$


The proof follows directly from formulas for moments of $W\_n$ derived in [On a Class of Problems Related to the Random Division of an Interval](https://projecteuclid.org/euclid.aoms/1177729030) (D.A. Darling, 1953).




---


A related result that also follows from Darling (1953) is the large-$n$ limit of $T\_n=-\sum\_{i=1}^n \ln(np\_i)$. As derived in [Logarithms of sample spacings](https://epubs.siam.org/doi/pdf/10.1137/0116099) (S. Blumenthal, 1968), $n^{-1/2}(T\_n-n\gamma)$ is asymptotically normally distributed as ${\cal N}( 0,\zeta(2)-1)$.


