Confused on the peak intensities in this mass spectrometry problem
Such problems in chemistry don't work out to infinite precision like pure math problems. You have to apply some chemical knowledge to the problem too.
The book formula is obviously an approximation to the exact solution. To find the exact values expected you'd need to use combinatorics.
Considering the chemistry:

7 carbons have a mass of 84, so a hydrocarbon molecule can't have that many carbons since there wouldn't be any hydrogen atoms.

5 carbons have a mass of 60, but that would mean at most 12 hydrogen atoms for an aliphatic molecule, so the mass could be at most 72.


Thus there must be 6 carbons in the molecule.