The second period ends at atomic number 10 while the third period ends at atomic number 18. Therefore, 9,12and 16 are the first elements in their respective groups. The atomic numbers of the other elements of the same group can be deduced by adding magic numbers of 8,18,18 and 32 to elements of 2nd period and by adding magic numbers of 18,18 and 32 to the elements of 3rd period. Thus,
9+8+18+18=53
12+8+18+18=56
16+18=34
elements with atomic numbers 9(F) and 53(I) belong to halogen family (group17); elements with atomic numbers 12(Mg) and 56(Ba) belong to alkaline earth metals (Group2) while elements with atomic numbers 16(S) and 34(Se) belong to oxygen family (Group16).