The Evolution of the Riemann Gas

An analysis of the evolution of the Riemann Gas and a study of its Information Geometry using tools for Manifold Learning.

Aidan Rocke

Figure 13: The Divine Revelation of Pythagoras


Figure 13, taken from the UMAP paper [8], describes the evolution of the Riemann Gas. In spite of the interesting properties of this remarkable mathematical entity, relatively little has been written on the subject.

In the following synthesis, we show that the Riemann Gas condenses important results in probabilistic and analytic number theory that may be explored in greater detail using methods for Manifold Learning.

State Space of the Riemann Gas:

Let’s suppose we define the state space \([1,n] \subset \mathbb{N}\) with eigenstates \(|p\rangle\) where \(\ln p\) are primons. A multi-particle state is given by the number \(\alpha_p\) of primons in the single-particle state \(p\):

\[\begin{equation} |n \rangle = |\alpha_2,\alpha_3,...,\alpha_p,..\rangle \tag{1} \end{equation}\]

which corresponds to the unique prime factorisation of \(n\):

\[\begin{equation} n = \prod_{k} p_k^{\alpha_k} \tag{2} \end{equation}\]

where this representation of \(n \in \mathbb{N}\) is unique due to the Unique Factorisation Theorem.

Using Koopman Operators to define the space of observables:

Given the state \(x_n = n\), we may use the Koopman Operator \(\Phi\) to lift dynamics from the space of states to the space of observables:

\[\begin{equation} \Phi \circ \textbf{log} \circ x_n = \textbf{log} \circ F \circ x_n = \textbf{log} \circ x_{n+1} \tag{3} \end{equation}\]

where \(\textbf{log}\) is an algorithm for integer factorisation, analogous to the discrete logarithm, and \(F\) is the successor function. Thus, we have:

\[\begin{equation} \textbf{log} \circ x_n = \bigoplus_k a_k \cdot \ln p_k \tag{4} \end{equation}\]

A precise motivation for defining the Koopman Operator \(\Phi\) is that it represents the simplest global linearisation of \(F\), which views linear combinations of eigenstates as integer partitions. In fact, the reader may easily check that the successor function is not a linear function:

\[\begin{equation} \forall n \in \mathbb{N}, F(n) = n+1 \implies \forall x,y \in \mathbb{N}^*, F(x+y) \neq F(x)+F(y) \tag{5} \end{equation}\]

Hence, \(\Phi\) is canonical.

Energies of the Riemann Gas:

If we take a Quantum Hamiltonian \(H\) to have energies proportional to \(\ln p\):

\[\begin{equation} H|p \rangle = E_p |p \rangle \tag{6} \end{equation}\]

with energies \(E_p = E_0 \cdot \ln p\), we may then derive:

\[\begin{equation} E_n = \sum_p \alpha_p \cdot E_p = E_0 \cdot \sum_p \alpha_p \cdot \ln p = E_0 \cdot \ln n \tag{7} \end{equation}\]

thanks to the Unique Factorisation Theorem.

Combinatorics and Entropy of the Phase-Space:

It is worth noting that the number of linear subspaces of the Riemann Gas allowed to evolve up to the state \(|N \rangle\) is on the order of:

\[\begin{equation} 2^{\pi(N)} \sim 2^{\frac{N}{\ln N} + \mathcal{O}\big(\sqrt{N} \ln N\big)} \tag{8} \end{equation}\]

assuming that the Riemann Hypothesis is true.

Moreover, Erdős’ proof of Euclid’s theorem tells us that the magnitude of the state \(|N \rangle\)(defined via a total order) is unbounded if and only if the entropy of the phase-space is unbounded.

From an information-theoretic formulation of the Prime Number Theorem, derived via an information-theoretic formulation of Chebyshev’s theorem due to Ioannis Kontoyiannis, this means that the expected information gained from observing \(\pi(N)\) eigenstates is on the order of:

\[\begin{equation} \sum_{p \leq N} H(X_p) = \sum_{p \leq N} \ln p \sim N \tag{9} \end{equation}\]

where we summed over the Statistical Information of each prime number.

Statistics of the Phase-Space dimension:

Let’s suppose we would like to know the average time, suitably-normalised, that the Riemann Gas spends in a particular subspace. How might this frequency be related to the dimension of this subspace?

If we characterize distinct linear subspaces as Erdős-Kac data which have the form of binary vectors, using the Erdős-Kac theorem we may actually demonstrate that this frequency depends upon nothing more than the dimension of the subspace. To be precise, if \(\omega(n)\) counts the number of unique prime divisors of \(n \in \mathbb{N}\) then the Erdős-Kac Law tells us that for large \(n\):

\[\begin{equation} \frac{\omega(n)-\ln \ln n}{\sqrt{\ln \ln n}} \tag{10} \end{equation}\]

has the standard normal distribution.

What is even more remarkable is that although the Erdős-Kac theorem has the form of a statistical observation, it could not have been discovered using statistical methods. In fact, for \(X \sim U([1,N])\) the normal order of \(\omega(X)\) only begins to emerge for \(N \geq 10^{100}\).

The Statistical Mechanics of the Riemann Gas:

The partition function of the Riemann Gas is given by:

\[\begin{equation} Z(T):= \sum_{n=1}^\infty \exp\big(-\frac{E_n}{k_B T}\big) = \sum_{n=1}^\infty \exp\big(-\frac{E_0 \cdot \ln n}{k_B T}\big) = \sum_{n=1}^\infty \frac{1}{n^s} = \zeta(s) \tag{11} \end{equation}\]

where we set \(s = \frac{E_0}{k_B T} \in \mathbb{C}\) and \(T\) represents the absolute temperature. This partition function is of great interest as it represents none other than the Riemann Zeta function and the Lee-Yang theorem suggests that the non-trivial zeroes of \(\zeta\) control the phase-space transitions of the Riemann Gas.

In fact, if we admit that the intrinsic dimension of the state \(|X \rangle\) where \(X \sim U([1,N])\) is given by \(\pi(N)\) then it was known to Riemann that:

\[\begin{equation} R(x) = \sum_{n=1}^\infty \frac{\mu(n)}{n} \text{li}(x^{\frac{1}{n}}) \tag{12} \end{equation}\]

\[\begin{equation} \pi(x) = R(x)-\sum_{\rho} R(x^{\rho}) \tag{13} \end{equation}\]

where the sum is taken over all non-trivial zeroes \(\rho\) of \(\zeta\).

Hence, the non-trivial zeroes of \(\zeta\) control the evolution of the intrinsic dimension of the Riemann Gas.


In a future analysis, we shall carefully motivate the hypothesis that the study of Erdős-Kac data using modern tools for experimental mathematics may generate new and interesting theorems. How so? If we view a theorem as the natural limit of perfect data compression, then we may study the Information Geometry of the Subspace evolution of the Riemann Gas(ie Erdős-Kac data) using Manifold Learning algorithms.

In particular, I believe that near-lossless data compression of Erdős-Kac data should allow us to recover well-understood theorems concerning arithmetic progressions of prime numbers, the Jacobi theta function as an archetype of the normal distribution and the Riemann Zeta function, and effective algorithms for prime counting.

The key difficulty is that we would need more than a robust theory for Manifold Learning(ex. Laplacian Eigenmap). In fact, we would need a Rosetta Stone that allows us to decipher and query the mathematical knowledge encoded in a low-dimensional manifold that emerges as the output of a Manifold Learning algorithm. Hence, our methods would need to be both robust and interpretable.


  1. Cover, T. M. and Thomas, J. A. Elements of Information Theory. New York: Wiley, 1991.

  2. Hardy, G. H.; Ramanujan, S. (1917), “The normal number of prime factors of a number n”, Quarterly Journal of Mathematics.

  3. Erdős, Paul; Kac, Mark (1940). “The Gaussian Law of Errors in the Theory of Additive Number Theoretic Functions”. American Journal of Mathematics.

  4. P. Billingsley, “Prime numbers and Brownian motion”, American Mathematical Monthly 80 (1973) 1099.

  5. J. Hadamard, Etude sur les Propriétés des Fonctions Entières et en Particulier d’une ´ Fonction Considérée par Riemann. 1893.

  6. J. Williamson. 2021.

  7. Borwein, J. and Bailey, D. Mathematics by Experiment: Plausible Reasoning in the 21st Century. Wellesley, MA: A K Peters, pp. 95-96 and 99-100, 2003.

  8. McInnes, Leland, and John Healy. “UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction.” arXiv preprint arXiv:1802.03426 (2018).


For attribution, please cite this work as

Rocke (2023, May 2). Kepler Lounge: The Evolution of the Riemann Gas. Retrieved from

BibTeX citation

  author = {Rocke, Aidan},
  title = {Kepler Lounge: The Evolution of the Riemann Gas},
  url = {},
  year = {2023}