Thanks all for the help

I have a similar question to this one which says this:

Oxides of the Third Period include:

Na2O

MgO2

Al2O3

SiO2

Cl2O7

So in this case it is MgO2 is the incorrect one because Mg = +2 and O = -2 therefore should be Mg2O2 right?

While the others are correct since:

Na = +1, O = -2 therefore Na2O

Al = +3, O = -2 therefore Al2O3

Cl = -1, +1, -3, -5, -7, 0 = -2, therefore Cl2O7

SiO2 is a bit hard because Si has a valency of 4 since it is a element in group 4 so how come it is SiO2 and Not Si2O4?

So which one is wrong SiO2 or MgO2? I say MgO2 but not sure why