Which element has the following configuration: [Xe]6s24f75d1?
Gd.... 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s2 4d10 5p6 6s2 4f7 5d1
[Xe] 4f7 5d1 6s2
[Xe] 6s2 5d1 4f7
No of electrons are 64
The electron configuration given above is lower in energy than "4f8 6s2". With the configuration "4f8 6s2" two electrons are paired in one orbital, whereas in "4f7 5d1 6s2" all of the electrons are in singly occupied orbitals, which has a lower total energy. Remember, electrons will always be in the lowest possible energy levels.
A "shell" is an antiquated term for an energy level or sublevel, sometimes written as "subshell". An "orbital" is not the same thing as a "shell". An orbital is a "mathematical probability density" and describes the region which is occupied by one or two electrons. The s-sublevel (subshell) has one orbital. The p-sublevel has three orbitals. The d-sublevel has 5 orbitals, and the f-sublevel has 7 orbitals. Each orbital can "contain" two electrons.