Given $N$ indistinguishable, quasi-independent particles capable of existing in energy levels $\epsilon_{1}, \epsilon_{2}, \cdots$, with degeneracies $g_{1}, g_{2}, \cdots$, respectively; in any given macrostate in which there are $N_{1}$ particles in energy level $\epsilon_{1}, N_{2}$ particles in energy level $\epsilon_{2}, \cdots$, assume the thermodynamic probability to be given by the Bose-Einstein expression,
$$
\Omega_{\mathrm{BE}}=\frac{\left(g_{1}+N_{1}\right) !\left(g_{2}+N_{2}\right) ! \cdots}{g_{1} ! N_{1} \backslash g_{2} ! N_{2} !}
$$
Using Stirling's approximation and the method of Lagrangian multipliers, render $\ln \Omega_{\mathrm{BE}}$ a maximum, subject to the equations of constraint $\sum N_{i}=N=$ const. and $\sum N_{i} \epsilon_{i}=U=$ const., and show that
$$
N_{i}=\frac{\boldsymbol{g}_{i}}{\lambda e^{-\beta \mathrm{k}_{4}}-1}
$$