# Entropy of a generalised two-state quantum system

Hi. This is the problem I'm trying to solve:

A system may be in two quantum states with energies '0' and 'e'. The states' degenerescences are g1 and g2, respectively. Find the entropy S as a function of the Energy E in the limit where the number of particles N is very large. Analyse this dependence and show that there is a region of negative temperature.

The energy of the system is given by

$$E=N(0\cdot P(0)+e P(e))$$

where,

$$P(0) = \frac{g1}{g1+g2} \,\,\,\,\,\,\,\,\,\, \mathrm{and} \,\,\,\,\,\,\,\,\,\, P(e) = \frac{g2}{g1+g2}$$

are the probabilities of the state with energy 0 and energy e being occupied. Now, I'm trying to find the number of possible microstates in order to calculate the entropy. Since I want to organise N particles in two groups of identical states, the number of microstates should be

$$\Sigma = \frac{N!}{\left(\frac{Ng1}{g1+g2}\right)!\left(\frac{Ng2}{g1+g2}\right)!}$$

Is this last expression correct? I'm not sure if it should be this or just the degenerescences.
Thank you very much.