Magnesium and calcium have similar chemical properties because a magnesium atom and a calcium atom have the same

(1) atomic number

(2) mass number

(3) total number of electron shells

(4) total number of valence electrons