= Solution
Use the \b[number-density <virial expansion>], following the <density versus molar second virial convention>, with $n=N/V$:
$$
\frac{p}{nk_BT}=1+B_2(T)n+O(n^2).
$$
Thus $B_2$ is the coefficient of the first <density> correction and has units of <volume>. With molar <density> instead, the molar coefficient is $N_AB_2$. For a classical pair potential $u(r)$,
$$
\boxed{B_2(T)=-\frac12\int\left(e^{-u(r)/(k_BT)}-1\right)d^3r=2\pi\int_0^\infty\left[1-e^{-u(r)/(k_BT)}\right]r^2dr.}
$$
Attractive separations contribute negatively and short-range repulsion contributes positively. For inert-gas interactions the attractive contribution dominates at sufficiently low <temperature>, $B_2$ crosses zero at the <Boyle temperature>, and repulsion dominates above it.
\Image[/past-exam-of-the-thermal-and-statistical-physics-course-of-the-university-of-cambridge/2016/paper-1-second-virial.png]
{title=An illustrative Lennard-Jones second virial coefficient is negative at low temperature, crosses zero and has a broad positive maximum}
{source=paper-1-second-virial.py}
The <soft-core high-temperature second virial coefficient> illustrates why the far-high-temperature tail depends on the model. A hard-core estimate $B_2\simeq b-a/(k_BT)$ tends to positive excluded <volume> $b$. A soft repulsive potential, such as the <Lennard-Jones potential> in the original diagram, allows a positive maximum followed by decay toward zero. The sign change is the main attraction-versus-repulsion feature; neither sketch should be interpreted as measured data for a specified gas. This classical, dilute-gas sketch omits low-temperature quantum-exchange corrections.<Classical Gases by David Tong>[Section 2.5: interacting gas, virial expansion and Mayer pair function]{ref}
Back to article page