Hard-sphere radial distribution function from the residual chemical potential