The relation between orbital filling and the periodic table