  We study the ground--state shell correction energy of a fermionic gas in a
mean--field approximation.
  Considering the particular case of 3D harmonic trapping potentials, we show
the rich variety of different behaviors (erratic, regular, supershells) that
appear when the number--theoretic properties of the frequency ratios are
varied. For self--bound systems, where the shape of the trapping potential is
determined by energy minimization, we obtain accurate analytic formulas for the
deformation and the shell correction energy as a function of the particle
number $N$. Special attention is devoted to the average of the shell correction
energy. We explain why in self--bound systems it is a decreasing (and negative)
function of $N$.
