Magnesium reacts with an elemennt (X) to form an ionic compound . If the ground state electronic configuration of (X ) is 1s^2 2s^2 2p^3