The maximum number of electrons that any atom can hold in its outer valence is 8. Oxygen has the electron configuration of 1s2 2s2 2p4, which means it can accept two more electrons.
8.
Both Mg and Na have the same outer energy level (shell). Mg has one proton more than NA and one electron more. The charge on th eouter shell the effective nuclear charge is reduced by the inner core electrons, which are the ame in both cases So the pull experienced by the valence electrons towards the nucleus is more in the case of Mg than Na. Hence Mg has slightly smaller size (radius) than Na.
The nitride ion, N3­­­ˉ, has an electron arrangement of 1s2, 2s2, 2p6 The elemental nitrogen, N, has an electron arrangement of 1s2, 2s2, 2p3. Since the nitride ion, N3-, has 3 extra electons, those 3 extra electrons fill the 2p orbital giving the electron arrangement above. This stabilizes the nitride ion because it is similar to a noble gas.