Solution (source code)

= Solution

For $N$ indistinguishable classical <particles> the <canonical partition function> is an <integral> over <phase space>,
$$
Z_N=\frac{1}{N!h^{3N}}\int_{V^N}\prod_{i=1}^N d^3r_i\int\prod_{i=1}^Nd^3p_i\,
\exp\left[-\beta\sum_i\frac{p_i^2}{2m}-\frac\beta2\sum_{i\ne j}\phi(r_{ij})\right].
$$
The factor $1/N!$ removes overcounting under <particle> permutations, and $h^{3N}$ makes the classical phase-space measure dimensionless. The <pair potential> depends only on positions, so all momentum integrations separate. The three-dimensional <Gaussian integral> for each <particle> gives
$$
\frac1{h^3}\int_{\mathbb R^3}e^{-\beta p^2/(2m)}d^3p
=\frac1{h^3}\left(\frac{2\pi m}{\beta}\right)^{3/2}
=\lambda^{-3},\qquad
\lambda=\sqrt{\frac{2\pi\hbar^2\beta}{m}}.
$$
The <grand canonical partition function> is $\Xi=\sum_{N=0}^\infty e^{\beta\mu N}Z_N$, where <chemical potential> $\mu$ controls the mean number of <particles>. Therefore
$$
\boxed{\Xi=\sum_{N=0}^\infty\frac1{N!}\left(\frac{e^{\beta\mu}}{\lambda^3}\right)^N
\int_{V^N}\prod_{i=1}^Nd^3r_i\,
\exp\left[-\frac\beta2\sum_{i\ne j}\phi(r_{ij})\right].}
$$
For $N=0$, the empty products and configurational <integral> equal one. The factor $1/2$ in the interaction prevents double counting of unordered <particle> pairs.