A compound is found to contain 23.3% magnesium, 30.7% sulfur and 46.0% oxygen. What is the empirical formula for this compound?
Hey! So, essentially we just need to compare their masses and find some values that make approximate sense. Let's say that the formula is

We know that mm(Mg)=24.3g, mm(S)=32.1g, mm(O)=16g. So, what can we tell from all this?



This is just the maths that pops out of the info we know. Whilst is COULD be helpful, there's an easier way. Notice that there is twice as much Oxygen as there is Magnesium (approximately). How can we get a ratio of Mg:O that is 1:2 by mass? Well, if we take three atoms of Oxygen, that will weight 48g. Half of 48g is 24g, which is basically the 24.3g we need! So, the empirical formula LOOKS LIKE it will take three moles of Oxygen for one more of Magnesium.
Now, to work in the sulfur. The mass needs to be between the 24.3g of Magnesium, and the 48g of Oxygen. Well, looks like it already is! If we double the moles of Sulfur, the mass will be GREATER than that of Oxygen, which we don't want. Okay, so let's check out what we've discovered and see if it makes sense.

The total mass of the above is 104.4g. For Mg, 24.3/104.4=0.23, exactly as much as desired. For Sulfur, 32.1/104.4=0.307, exactly as expected. Finally, for Oxygen, 3*16/104.4=0.46, exactly as expected.
You'll note that there was a level of intuition in the above answer. I remember there being a move definitive way; let me think for a bit, and I'll try remember it!
Jake