Effective number of relativistic energy degrees of freedom (source code)

= Effective number of relativistic energy degrees of freedom
{title2=$g_*$}

For relativistic species in thermal equilibrium at a common temperature $T$, the total energy density can be written
$$
\epsilon=\frac{4\pi^5}{15(hc)^3}g_*(k_BT)^4,
\qquad
g_*=\sum_{\rm bosons}g_i+\frac78\sum_{\rm fermions}g_i.
$$
The factor $7/8$ is the <fermion-to-boson thermal integral ratio> for energy density.