### abstract

- Density-functional theory (DFT) is an exact alternative formulation of quantum mechanics, in which it is possible to calculate the total energy, the spin, and the charge density of many-electron systems in the ground state. In practice, it is necessary to use uncontrolled approximations that can mainly be verified against experimental data. Atoms and ions are simple systems, where the approximations of DFT can be easily tested. We have calculated within DFT the total energies, spin, and higher ionization energies of all the ions of elements with $1\ensuremath{\leqslant}Z\ensuremath{\leqslant}29$. We find the calculations in close agreement with experiment, with an error of typically less than ca. 1% for $1\ensuremath{\leqslant}Z\ensuremath{\leqslant}29$. Surprisingly, the error depends on the electronic configuration of the ion in both local spin density approximation and Perdew-Burke-Ernzerhof general gradient approximation and independent of both self-interaction correction and relativistic corrections. Larger errors are found for systems in which the spin-spin correlation is significant, which indicates the possible benefit from an orbital-dependent formulation of the correlation energy functional.