Solution (source code)

= Solution

Let $x=\mathcal E/(k_BT)>0$ and $r=e^{-x}$. The one-particle internal <partition function> is $z=(1-r^q)/(1-r)$, and independence gives $Z=z^N$. The mean level index is
$$
\langle j\rangle=-\frac d{dx}\log z=\frac r{1-r}-\frac{qr^q}{1-r^q}.
$$
Thus the full internal entropy is
$$
\boxed{S=Nk_B\left[\log\frac{1-e^{-qx}}{1-e^{-x}}+
 x\left(\frac1{e^x-1}-\frac q{e^{qx}-1}\right)\right]}.
$$
This describes the specified internal degrees of freedom, with no translational or mixing contribution added. For a positive level spacing, \b[$S\to0$ as $T\to0$], since the unique lowest internal level becomes certain, while \b[$S\to Nk_B\log q$ as $T\to\infty$], since all $q^N$ internal configurations become equally likely. The formula includes $q=1$, where the entropy is identically zero.