From Mendeleev's original periodic table, elements have been basically arranged by valence (groups in columns) and the repetition therein (periods in rows).
The numeration was chosen so that the characteristic oxides of the B groups would correspond to those of the A groups.