Which electron shells make up the electron gas? I want to get to know the concept of electronic gas. The first question is what does an electron gas consist of? If it consists for example of s or d electrons, I have a contradiction since the electron gas is delocalized and does not belong to any of the ions, but the s or d electrons are strictly localized near one of the ions.
 A: The abstract idea of a Fermi gas is simply that of a bunch of fermions that are free to move in space.
In this abstract framework, fermions (electrons) are not bound to an atom, and hence the usual quantum numbers ($n$, $l$, $m$, $\sigma$) that we use to describe atomic states are meaningless.
The energy states of a single particle are labeled by other quantum numbers, for example the momentum $\vec{k}$ and the spin $\sigma$ (usually they are $\varepsilon_k = \hbar^2k^2/2m$, where $m$ is the particle mass and they are degenerate in spin).
As long as the temperature is reasonably small, the only "active" fermions are those with an energy close to the Fermi energy because thermal fluctuations can make them jump to empty states that are very close in energy.
Now in real materials the situation is totally different, since electrons "come from" the $N$ atoms forming the crystal.
If all the atoms were decoupled (very far apart from each other), clearly the electronic states would be those of a single atom, but $N$-fold degenerate because there are $N$ atoms. Hence the energy spectrum would be very peaked around the atomic states' energies.
When the atoms are coupled (realistic case), it turns out that this degeneracy is broken and the spectrum broadens into a band of states, but you can still identify all those states with the atomic state from where they come ($1s$, $2s$, $2p$, etc.).
Again the only active electrons are those with an energy level close to the Fermi energy, but clearly these electrons come from the atomic valence shell of the atom.
You can thus simplify the calculations by writing models that only involve energy bands close to the Fermi energy.
Notice that now, just because these bands "come from" atomic states, it doesn't mean that electrons are localized close to the atom! In fact they are completely delocalized.
