It is primarily used in introductory statistical mechanics and thermodynamics textbooks to explain the microscopic definition of entropy to students. If the spins are non-interacting, then the multiplicity function counts the number of states which have the same energy in an external magnetic field. By definition, the entropy S is then given by the natural logarithm of this number: