Aufbau principle

The aufbau principle, from the German "Aufbauprinzip" (building-up principle), also called the aufbau rule, states that in the ground state of an atom or ion, electrons fill atomic orbitals of the lowest available energy levels before occupying higher levels. For example, the 1s subshell is filled before the 2s subshell is occupied. In this way, the electrons of an atom or ion form the most stable electron configuration possible. An example is the configuration 1s2 2s2 2p6 3s2 3p3 for the phosphorus atom, meaning that the 1s subshell has 2 electrons, and so on.
Electron behavior is elaborated by other principles of atomic physics, such as Hund's rule and the Pauli exclusion principle. Hund's rule asserts that if multiple orbitals of the same energy are available, electrons will occupy different orbitals singly before any are occupied doubly. If double occupation does occur, the Pauli exclusion principle requires that electrons that occupy the same orbital must have different spins (+1/2 and −1/2).
As we pass from one element to another of the next higher atomic number, one proton and one electron are added each time to the neutral atom.
The maximum number of electrons in any shell is 2"n"2, where "n" is the principal quantum number.
The maximum number of electrons in a subshell (s, p, d, or f) is equal to 2(2ℓ+1) where ℓ = 0, 1, 2, 3...
Thus these subshells can have a maximum of 2, 6, 10, and 14 electrons respectively.
In the ground state, the electronic configuration can be built up by placing electrons in the lowest available orbitals until the total number of electrons added is equal to the atomic number. Thus orbitals are filled in the order of increasing energy, using two general rules to help predict electronic configurations:
A version of the aufbau principle known as the nuclear shell model is used to predict the configuration of protons and neutrons in an atomic nucleus.
Madelung energy ordering rule.
In neutral atoms, the approximate order in which subshells are filled is given by the "n + ℓ rule", also known as the:
Here "n" represents the principal quantum number and "ℓ" the azimuthal quantum number; the values "ℓ" = 0, 1, 2, 3 correspond to the "s", "p", "d", and "f" labels, respectively. The subshell ordering by this rule is 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p, 8s, 5g, ... For example titanium ("Z" = 22) has the ground-state configuration 1s2 2s2 2p6 3s2 3p6 4s2 3d2. 
Other authors write the orbitals always in order of increasing n, such as Ti (Z = 22) 1s2 2s2 2p6 3s2 3p6 3d2 4s2. This can be called "leaving order", since if this atom is ionized, electrons leave approximately in the order 4s, 3d, 3p, 3s, etc. For a given neutral atom, the two notations are equivalent since only the orbital occupancies have physical significance.
Orbitals with a lower "n + ℓ" value are filled before those with higher "n + ℓ" values. In the case of equal "n + ℓ" values, the orbital with a lower "n" value is filled first. The Madelung energy ordering rule applies only to neutral atoms in their ground state. There are twenty elements (eleven in the d-block and nine in the f-block) for which the Madelung rule predicts an electron configuration that differs from that determined experimentally, although the Madelung-predicted electron configurations are at least close to the ground state even in those cases.
One inorganic chemistry textbook describes the Madelung rule as essentially an approximate empirical rule although with some theoretical justification, based on the Thomas-Fermi model of the atom as a many-electron quantum-mechanical system.
Exceptions in the d-block.
The valence d-subshell "borrows" one electron (in the case of palladium two electrons) from the valence s-subshell.
A special exception is lawrencium 103Lr, where the 6d electron predicted by the Madelung rule is replaced by a 7p electron: the rule predicts [Rn]5f146d17s2, but the measured configuration is [Rn]5f147s27p1.
For example, in copper 29Cu, according to the Madelung rule, the 4s orbital ("n + ℓ" = 4 + 0 = 4) is occupied before the 3d orbital ("n + ℓ" = 3 + 2 = 5). The rule then predicts the electron configuration 1s22s22p63s2 3p63d94s2, abbreviated [Ar]3d94s2 where [Ar] denotes the configuration of argon, the preceding noble gas. However, the measured electron configuration of the copper atom is [Ar]3d104s1. By filling the 3d orbital, copper can be in a lower energy state.
Exceptions in the f-block.
The valence d-subshell often "borrows" one electron (in the case of thorium two electrons) from the valence f-subshell. For example, in uranium 92U, according to the Madelung rule, the 5f orbital ("n + ℓ" = 5 + 3 = 8) is occupied before the 6d orbital ("n + ℓ" = 6 + 2 = 8). The rule then predicts the electron configuration [Rn]5f47s2 where [Rn] denotes the configuration of radon, the preceding noble gas. However, the measured electron configuration of the uranium atom is [Rn]5f36d17s2.
All these exceptions are not very relevant for chemistry, as the energy differences are quite small and the presence of a nearby atom can change the preferred configuration. The periodic table ignores them and follows idealised configurations. They occur as the result of interelectronic repulsion effects; when atoms are positively ionised, most of the anomalies vanish.
The above exceptions are predicted to be the only ones until element 120, where the 8s shell is completed. Element 121, starting the g-block, should be an exception in which the expected 5g electron is transferred to 8p (similarly to lawrencium). After this, sources do not agree on the predicted configurations, but due to very strong relativistic effects there are not expected to be many more elements that show the expected configuration from Madelung's rule beyond 120. The general idea that after the two 8s elements, there come regions of chemical activity of 5g, followed by 6f, followed by 7d, and then 8p, does however mostly seem to hold true, except that relativity "splits" the 8p shell into a stabilized part (8p1/2, which acts like an extra covering shell together with 8s and is slowly drowned into the core across the 5g and 6f series) and a destabilized part (8p3/2, which has nearly the same energy as 9p1/2), and that the 8s shell gets replaced by the 9s shell as the covering s-shell for the 7d elements.
History.
The Aufbau principle in the new quantum theory.
The principle takes its name from German, "", "building-up principle", rather than being named for a scientist. It was formulated by Niels Bohr and Wolfgang Pauli in the early 1920s. This was an early application of quantum mechanics to the properties of electrons and explained chemical properties in physical terms. Each added electron is subject to the electric field created by the positive charge of the atomic nucleus "and" the negative charge of other electrons that are bound to the nucleus. Although in hydrogen there is no energy difference between orbitals with the same principal quantum number "n", this is not true for the outer electrons of other atoms.
In the old quantum theory prior to quantum mechanics, electrons were supposed to occupy classical elliptical orbits. The orbits with the highest angular momentum are 'circular orbits' outside the inner electrons, but orbits with low angular momentum ("s"- and "p"-orbitals) have high orbital eccentricity, so that they get closer to the nucleus and feel on average a less strongly screened nuclear charge.
The "n + ℓ" energy ordering rule.
A periodic table in which each row corresponds to one value of "n" + "ℓ" (where the values of "n" and "ℓ" correspond to the principal and azimuthal quantum numbers respectively) was suggested by Charles Janet in 1928, and in 1930 he made explicit the quantum basis of this pattern, based on knowledge of atomic ground states determined by the analysis of atomic spectra. This table came to be referred to as the left-step table. Janet "adjusted" some of the actual "n" + "ℓ" values of the elements, since they did not accord with his energy ordering rule, and he considered that the discrepancies involved must have arisen from measurement errors. In the event, the actual values were correct and the "n" + "ℓ" energy ordering rule turned out to be an approximation rather than a perfect fit, although for all elements that are exceptions the regularised configuration is a low-energy excited state, well within reach of chemical bond energies.
In 1936, the German physicist Erwin Madelung proposed this as an empirical rule for the order of filling atomic subshells, and most English-language sources therefore refer to the Madelung rule. Madelung may have been aware of this pattern as early as 1926. 
In 1945 William Wiswesser proposed that the subshells are filled in order of increasing values of the function
In 1962 the Russian agricultural chemist V.M. Klechkowski proposed the first theoretical explanation for the importance of the sum "n + ℓ" (i.e. electron shells fill up in order of increasing "n + ℓ"), based on the statistical Thomas–Fermi model of the atom. Many French- and Russian-language sources therefore refer to the Klechkowski rule. In 1979, D. Pan Wong provided a theoretical justification for the second part of the Madelung rule (that for two orbitals with the same value "n + ℓ", the one with the smaller value of "n" fills first).
In recent years it has been noted that the order of filling orbitals in neutral atoms does not always correspond to the order of adding or removing electrons for a given atom. For example, in the fourth row of the periodic table, the Madelung rule indicates that the 4s orbital is occupied before the 3d. The neutral atom ground state configurations are therefore K = (Ar)4s, Ca = (Ar)4s2, Sc = (Ar)4s23d, etc. However, if a scandium atom is ionized by removing electrons (only), the configurations are Sc = (Ar)4s23d, Sc+ = (Ar)4s3d, Sc2+ = (Ar)3d. The orbital energies and their order depend on the nuclear charge; 4s is lower than 3d as per the Madelung rule in K with 19 protons, but 3d is lower in Sc2+ with 21 protons. The Madelung rule should only be used for neutral atoms.
In addition to there being ample experimental evidence to support this view, it makes the explanation of the order of ionization of electrons in this and other transition metals more intelligible, given that 4s electrons are invariably preferentially ionized.