Number Theory and the Periodicity of Matter