where n = N / N A is the number of moles of gas and R = N A k B is the gas constant. Although equipartition provides a simple derivation of the ideal-gas law and the internal energy, the same results can be obtained by an alternative method using the partition function.