In statistical mechanics, the hard hexagon model is a 2-dimensional lattice model of a gas, where particles are allowed to be on the vertices of a triangular lattice but no two particles may be adjacent.
The model was solved by Baxter (1980), who found that it was related to the Rogers–Ramanujan identities.
The partition function of the hard hexagon model.
The hard hexagon model occurs within the framework of the grand canonical ensemble, where the total number of particles (the "hexagons") is allowed to vary naturally, and is fixed by a chemical potential. In the hard hexagon model, all valid states have zero energy, and so the only important thermodynamic control variable is the ratio of chemical potential to temperature "μ"/("kT"). The exponential of this ratio, "z" = exp("μ"/("kT")) is called the activity and larger values correspond roughly to denser configurations.
For a triangular lattice with "N" sites, the grand partition function is
formula_1
where "g"("n", "N") is the number of ways of placing "n" particles on distinct lattice sites such that no 2 are adjacent. The function κ is defined by
formula_2
so that log(κ) is the free energy per unit site. Solving the hard hexagon model means (roughly) finding an exact expression for κ as a function of "z".
The mean density ρ is given for small "z" by
formula_3
The vertices of the lattice fall into 3 classes numbered 1, 2, and 3, given by the 3 different ways to fill space with hard hexagons. There are 3 local densities ρ1, ρ2, ρ3, corresponding to the 3 classes of sites. When the activity is large the system approximates one of these 3 packings, so the local densities differ, but when the activity is below a critical point the three local densities are the same. The critical point separating the low-activity homogeneous phase from the high-activity ordered phase is formula_4 with golden ratio "φ". Above the critical point the local densities differ and in the phase where most hexagons are on sites of type 1 can be expanded as
formula_5 
formula_6
Solution.
The solution is given for small values of "z"  ; "z""c" by
formula_7
formula_8
formula_9
where
formula_10
formula_11
formula_12
formula_13
For large "z"  ; "z""c" the solution (in the phase where most occupied sites have type 1) is given by 
formula_14
formula_15
formula_16
formula_17
formula_18
The functions "G" and "H" turn up in the Rogers–Ramanujan identities, and the function "Q" is the Euler function, which is closely related to the Dedekind eta function. If "x" = e2πiτ, then "x"−1/60"G"("x"), "x"11/60"H"("x"), "x"−1/24"P"("x"), "z", κ, ρ, ρ1, ρ2, and ρ3 are modular functions of τ, while "x"1/24"Q"("x") is a modular form of weight 1/2. Since any two modular functions are related by an algebraic relation, this implies that the functions "κ", "z", "R", "ρ" are all algebraic functions of each other (of quite high degree) . In particular, the value of "κ"(1), which Eric Weisstein dubbed the hard hexagon entropy constant , is an algebraic number of degree 24 equal to 1.395485972... (OEIS: ).
Related models.
The hard hexagon model can be defined similarly on the square and honeycomb lattices. No exact solution is known for either of these models, but the critical point "z"c is near for the square lattice and for the honeycomb lattice; "κ"(1) is approximately 1.503048082... (OEIS: ) for the square lattice and 1.546440708... for the honeycomb lattice .