Benford's first digit law states that the first digit of any set of random numbers is most likely to be 1. Specifically, the probability of the first digit being (1)as a direct consequence of equilibrium among subsystems. Here, $ \u27e8 n i \u27e9$ represents the equilibrium number of subsystem

*d*is $ log ( 1 + ( 1 / d ) )$ with $ d = 1 , 2 , \u2026 , 9$. In a recent paper, Don Lemons introduced an ingenious way to relate Benford's law to thermodynamics.^{1}He likened a large number*N*to a thermal system that can be partitioned into*I*smaller subsystems, each having a number $ i n i$, such that $ N = \u2211 i = 1 I i n i$. If $\epsilon $ is a quantum of energy, $ N \epsilon $ represents the total energy of the system. For a fixed*N*, the system is closed, and the partition of*N*corresponds to the distribution of energy among the subsystems. Different partitions, therefore, amount to fluctuating energies for each subsystem. This can be viewed as the consequence of the free exchange of energy among subsystems through thermal contact. The number of all possible partitions of*N*corresponds to the number of all accessible microstates, $ \Omega I , N$, which defines the entropy $ S = k B \u2009 ln \u2009 \Omega I , N$ of this closed system. Lemons then derived the entropy*S*using the so-called “high-dimensionality argument,”^{2}namely, for $ I \u226b 1$: $ S = k B \u2009 ln \u2009 ( ( e 2 N ) / I 2 ) I$. The “Benford distribution” was finally obtained as$ i \u27e8 n i \u27e9 = N / I$

*i*. It should be pointed out that the average bracket is needed here because, in the thermodynamic limit, the subsystems will most likely take their average values, by virtue of the central limit theorem.When I use this example in my thermodynamics class, the students find it both inspiring and confusing. The introduction of the analogy with a thermal system deepens their understanding of what a closed system is and helps me convey two fundamental thermodynamic concepts: temperature and entropy. However, the derivation of the entropy *S* proves to be a big challenge for undergraduates. Therefore, following the ideas of Lemons, I will show that the Benford distribution could be derived using a simple physical model without invoking the high-dimensionality argument.

We may regard each subsystem (2)As $ T \u2192 \u221e$ or $ i \epsilon \u226a k B T$, the discreteness of energy is not relevant, and we have the classical limit or the Rayleigh–Jeans approximation, (3)which recovers the Benford distribution. This also expresses the equipartition principle of classical statistical mechanics, where each radiation mode has equal thermal energy $ k B T$ or $ \u27e8 n i \u27e9 i = N / I$. Since $ k B T \u226b \epsilon $, we notice that $ N \u226b I$. This is reasonable because the key property of the Benford distribution is scale invariance. (4)where $ x = i \epsilon / k B T$. Its Gibbs entropy is (5)Taking the classical limit, $ T \u2192 \u221e$, we have $ x = i \epsilon / k B T \u2245 \u27e8 n i \u27e9 \u2212 1 \u226a 1$ and (6)The total entropy can be recovered as follows: (7)where Stirling's approximation $ I ! \u2248 ( I / e ) I$ is used in the last step. In Ref. 1, this entropy is obtained by counting all the possible microstates, which correspond to the microcanonical ensemble method for a closed system. Here, by introducing the concept of temperature, we use the grand canonical ensemble for an open system, which is much simpler. In the thermodynamic limit, these two ensembles are equivalent.

*i*as a single radiation mode. $ i \epsilon $ then corresponds to the unit energy or photon energy of radiation mode*i*, and $ \u27e8 n i \u27e9$ is the average photon number at some temperature*T*,^{3}^{,}$ \u27e8 n i \u27e9 = 1 e i \epsilon / k B T \u2212 1 .$

$ \u27e8 n i \u27e9 \u2243 k B T i \epsilon \u221d 1 i ,$

^{4}Since $\epsilon $ is our arbitrary unit of energy, it could be taken as small as we want, so that*N*would then go to infinity. Meanwhile, in the thermodynamic limit, the central limit theorem states that the distribution of photon number in each mode becomes peaked around $ \u27e8 n i \u27e9$. Since the average photon number of each mode is determined by the Benford distribution, the uncertainty in the system or the system's entropy can be calculated by summing contributions from each mode. Mode*i*has a photon distribution,^{3}$ p i ( n ) = ( 1 \u2212 e \u2212 x ) e \u2212 n x ,$

$ S i = \u2212 k B \u2211 n = 0 \u221e p i ( n ) \u2009 ln \u2009 p i ( n ) = \u2212 k B [ ln \u2009 ( 1 \u2212 e \u2212 x ) \u2212 x \u27e8 n i \u27e9 ] .$

$ S i \u2245 k B \u2009 ln \u2009 e \u27e8 n i \u27e9 = k B \u2009 ln \u2009 ( e N I i ) .$

$ S = \u2211 i = 1 I S i = k B \u2009 ln \u2009 [ ( e N I ) I 1 I ! ] \u2245 k B \u2009 ln \u2009 ( e 2 N I 2 ) I ,$

Finally, we would like to comment on our choice of the radiation mode, or Bose–Einstein statistics (with chemical potential $ \mu = 0$), to derive the Benford law. This may seem like a natural but arbitrary choice, but it is actually the only valid one. Indeed, the Bose–Einstein and Fermi–Dirac population of an energy level $\epsilon $ are given by (8)with “+” for the Fermi–Dirac and “–” for the Bose–Einstein distributions. If $ e ( \epsilon \u2212 \mu ) / k B T \u226b 1$, the $ \xb1 1$ term can be neglected, and $ f \xb1 ( \epsilon )$ reduces to the Boltzmann distribution, $ f ( \epsilon ) = e \u2212 ( \epsilon \u2212 \mu ) / k B T \u226a 1$, which means negligible level occupation. As long as the occupation with two or more particles is highly improbable, a harmonic oscillator reduces to a two level system (occupied or empty), which can, in turn, be described by the Fermi–Dirac distribution. However, in our case, each harmonic oscillator mode has high occupation number, $ \u27e8 n i \u27e9 \u226b 1$. Therefore, we cannot use the Fermi–Dirac or the Boltzmann statistics to get the Benford law.

$ f \xb1 ( \epsilon ) = 1 e ( \epsilon \u2212 \mu ) / k B T \xb1 1 ,$

## REFERENCES

1.

Don S.

Lemons

, “
Thermodynamics of Benford's first digit law

,” Am. J. Phys.

87

(10

), 787

–790

(2019

).2.
, 2nd ed. (

Herbert B.

Callen

, *Thermodynamics and an Introduction to Statistical Mechanics*

Wiley

,
New York

, 1985

), pp. 343

–348

.3.
, 2nd ed. (

C.

Kittel

and
H.

Kroemer

, *Thermal Physics*

W.H.Freeman and Company

,
New York

, 1980

), pp. 89

–91

.4.

A.

Burgos

and
A.

Santos

, “
The Newcomb-Benford law: Scale invariance and a simple Markov process based on it

,” Am. J. Phys.

89

(9

), 851

–861

(2021

).© 2023 Author(s). Published under an exclusive license by American Association of Physics Teachers.

2023

Author(s)