Solution (source code)

= Solution

Normalizing the <geometric distribution> requires
$$
1=\theta_0\sum_{j=0}^{\infty}x^j=\frac{\theta_0}{1-x},
\qquad \theta_0=1-x,\qquad 0\leq x<1.
$$
There are $M\theta_j$ sites containing $j$ atoms each. Therefore the expected total population is
$$
N_{\rm ads}=M\sum_{j=1}^{\infty}j\theta_j
=M(1-x)\sum_{j=1}^{\infty}jx^j
=M(1-x)\frac{x}{(1-x)^2}.
$$
Consequently
$$
\boxed{N_{\rm ads}=\frac{Mx}{1-x}
=\frac{M K_{\rm ads}p}{1-K_{\rm ads}p}}.
$$
The quantity counted is the total number of atoms in every layer. The number of nonempty columns is instead $M(1-\theta_0)=Mx$.