  We consider equilibrium level occupation numbers in a Fermi gas with a fixed
number of particles, n, and finite level spacing. Using the method of
generating functions and the cumulant expansion we derive a recurrence relation
for canonical partition function and an explicit formula for occupation numbers
in terms of single-particle partition function at n different temperatures. We
apply this result to a model with equidistant non-degenerate spectrum and
obtain close-form expressions in terms of q-polynomials and Rogers-Ramanujan
partial theta function. Deviations from the standard Fermi-Dirac distribution
can be interpreted in terms of a gap in the chemical potential between the
particle and the hole excitations with additional correlations at temperatures
comparable to the level spacing.
