Imagine $N$ oscillators with only two possible energies, $\epsilon_0$ and $ \epsilon_1$, with $\epsilon_1 > \epsilon_0$. Taking $\epsilon_0 = 0$ for now
I showed $\Omega(q\epsilon_1) = \frac{N!}{(N-q)!q!}$ and then
$$\frac{\partial S}{\partial q} = k \log(N/q - 1) $$
How can I use the above equation to show that
$$U = N\epsilon_1\frac{e^{-\epsilon_1/(kT)}}{1+e^{-\epsilon_1/(kT)}} $$
I tried moving the $\partial q$ over to the right, and then have $dS = dU/T$, but i wasn't getting anything meaningful.