Answer
$Mg^{2+}$
Work Step by Step
When Sodium Carbonate is added to water, it dissociates into sodium and carbonate ions. The carbonate ions combine with Magnesium ions in the solution to form Magnesium Carbonate, which is insoluble in water; hence, it precipitates. On the other hand, Magnesium sulfate is soluble in water; hence, no precipitate is formed.