So say we have $2$ indistinguishable electrons that can occupy $2$ energy states $E=0$ and $E=\Delta$. If we only had one fermion then are both states doubly degenerate since an electron can be spin up or spin down in each state? If that is true then the partition function for $1$ electron becomes:
$$Z_1=2+2e^{-\beta \Delta}$$
And then we have that:
$$Z_2=\frac{1}{N!}Z_1^2=\frac{1}{2}\left(2+2e^{-\beta\Delta}\right)=2+4e^{-\beta\Delta}+2e^{-2\beta\Delta}$$
But when I'm actually counting the states I find that there are $4$ different possibilities for the energy state $\Delta$ but only $1$ possible way for both electrons to occupy the ground the state or excited state since the electrons are indistinguishable. That would imply that:
$$Z_2=1+4e^{-\beta\Delta}+e^{-2\beta\Delta}$$
So which is it? What is going on here? Does the formula for $Z_2$ in terms of $Z_1$ for indistinguishable particles not hold for fermions? What about Bosons? Bosons don't have any spin so for $1$ boson the two level partition function should be:
$$Z_{1b}=1+e^{-\beta\Delta}$$
And then using the same formula for indistinguishable particles we have that:
$$Z_{2b}=\frac{1}{2}Z_{1b}^2=\frac{1}{2}\left(1+e^{-\beta\Delta}\right)=\frac{1}{2}+e^{-\beta\Delta}+\frac{1}{2}$$
But actually counting the states for $2$ bosons in a $2$ level system I get that there is $1$ possible way for both bosons to occupy the ground state or excited state, and $1$ way for one particle to occupy the ground state while one particle to occupies the excited state thus the partition function should be:
$$Z_2=1+e^{-\beta\Delta}+e^{-2\beta\Delta}$$
So I guess I'm ultimately asking why the formula for the partition function of $N$ non interacting indistinguishable particles isn't working for bosons and fermions. What am I missing?