I am reading Section 2.4 of Equilibrium Statistical Physics by Plischke and Bergersen, where they briefly discuss a system of noninteracting fermions in the grand canonical ensemble, and I am having some trouble understanding how to derive their expression for the mean occupation number of each state.
They index each single particle state by a wave vector $\mathbf k$ and a spin index $\sigma$, but let us write $\gamma = (\mathbf k, \sigma)$ for short. The contribution of one such state to the grand partition function is
$$\sum_{n=0}^1 \exp\{-n \beta (E_\gamma - \mu)\} = 1 + \exp\{-\beta (E_\gamma - \mu)\} \tag 1$$
and hence
$$Z_G = \prod_\gamma [1 + \exp\{-\beta (E_\gamma - \mu)\}]. \tag 2$$
They then state, without derivation, that the mean total number of particles is given by
$$\langle N \rangle = \sum_\gamma \frac{1}{\exp\{\beta (E_\gamma - \mu)\} + 1}, \tag 3$$
and that the mean occupation number of state $\gamma$ is
$$\langle n_\gamma \rangle = \frac{1}{\exp\{\beta (E_\gamma - \mu)\} + 1}. \tag 4$$
I have managed to derive (3) as follows. First I note that I can expand the product above to obtain
$$Z_G = \sum_{N=0}^\infty \sum_{\langle \gamma_1, \dotsc, \gamma_N \rangle} \exp\left\{ -\beta \left( \sum_{i=1}^N E_{\gamma_i} - N \mu \right) \right\}, \tag 5$$
where I use the notation $\langle \gamma_1, \dotsc, \gamma_N \rangle$ to mean that the inner sum is taken over all combinations of $N$ state indices. (For $N=0$ we must define the inner sum to be 1.) It is then clear that each term in the sum is proportional to the probability of the corresponding configuration. Hence we can use it to compute expectation values in the usual way, and thus obtain
$$\langle N \rangle = \frac{1}{Z_G} \sum_{N=0}^\infty \sum_{\langle \gamma_1, \dotsc, \gamma_N \rangle} N \exp\left\{ -\beta \left( \sum_{i=1}^N E_{\gamma_i} - N \mu \right) \right\} = \beta^{-1} \frac{\partial \ln Z_G}{\partial \mu}. \tag 6$$
Then (3) follows easily from (6). I have tried to do something similar to derive (4), but with little progress. Could anyone show how to do it, or at least give some pointers?