When writing an ionic compound formula, a "molecular" form is used. The formula is made with allowance for ion charges.
For example,
Ca²⁺ and NO₃⁻ ⇒ Ca(NO₃)₂
Al³⁺ and SO₄²⁻ ⇒ Al₂(SO₄)₃
In order to calculate the number of atoms, we must first know the number of moles present. And
moles = (mass present) / (molecular mass)
Therefore, the moles of Mg present are
170 / 24 = 7.08
The number of atoms in a mole of substance is given by Avagadro's Number which is 6.02 x 10^23
Since there are 7.08 moles, there are:
7.08 * 6.02*10^23
= 4.26 * 10^24 atoms
Compressions are regions of high pressure due to particles being close together
rarefactions are regions of low pressure due to particles being spread further apart
Longitudinal waves are often demonstrated by pushing and pulling a stretched slinky spring