This question is from the book "Introductory Statistical Mechanics" by Bowley and Sanchez. The question is as follows:
Calculate the free energy of a system with N particles, each with spin 3/2 with one particle per site, given that the levels associated with the four spin states have energies $\frac{3}{2}\epsilon$, $\frac{1}{2}\epsilon$, $\frac{-1}{2}\epsilon$, and $\frac{-3}{2}\epsilon$ and degeneracies 1, 3, 3, and 1 respectively.
The answer given at the end of the book is $-3Nk_BT\ln(e^{\epsilon/2k_BT}+e^{-\epsilon/2k_BT})$
The way I proceeded to write the partition function is as follows: The degeneracy due to spin $g_n^{spin}=2s+1=4$
Hence the partition function is: $$Z=4e^{-3\epsilon/2k_BT}+12e^{-\epsilon/2k_BT}+12e^{\epsilon/2k_BT}+4e^{3\epsilon/2k_BT}$$ Note that I have also multiplied by the degeneracy indicated in the body of the question. However, since $F=-k_BT\ln(Z)$ the answer is not the same as quoted in the appendix of the book. I would be very grateful if you could provide insight on this issue.