Barium is in period 6 and magnesium is in period 3 of the periodic table. Which element would lose one electron more easily, and why?