Suppose there are $N$ distuinguishable particles. Each particle can have energy either $\epsilon_1$ or$ \epsilon_2 $ $\epsilon_2 $. $ n_1$ particles have energy $\epsilon_1 $and $n_2$ particles have $\epsilon_2 $$\epsilon_2$ i.(N=$n_1 + n_2 $)e. $N=n_1 + n_2$. What is the partition function? Is it \begin{equation}Z= [exp(-\beta \epsilon_1)+exp(-\beta \epsilon_2)]^{N}\end{equation} or\begin{equation} Z=exp(-\beta \epsilon_1 n_1)+exp((-\beta \epsilon_2 n_2)~?\end{equation} $$Z= [\exp(-\beta \epsilon_1)+\exp(-\beta \epsilon_2)]^{N}$$ or $$Z=\exp(-\beta \epsilon_1 n_1)+\exp((-\beta \epsilon_2 n_2)~?$$