<p>Magnesium reacts with an element (X) to form an ionic compound. If the ground state electronic configuration of (X) is&nbsp;<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn><msup><mi>s</mi><mn>2</mn></msup><mn>2</mn><msup><mi>s</mi><mn>2</mn></msup><mn>2</mn><msup><mi>p</mi><mn>3</mn></msup></math>, the simplest formula for this compound is:</p>