A compound has $67.3 \% \rm~C,4.62 \%~N,6.93 \%~ H$ and O. Determine the molecular formula of the compound knowing its molar mass is $283\rm~\frac{g}{mol}$.
My solution : The percentage for the oxygen is $$100-( 67.3+4.62+6.93)=21.15$$ percent oxygen. Lets determine the number of moles for every substance.
For the carbon we have $$n_C = \frac{67.3 \rm~g}{12\rm~\frac{g}{mol}} =5.6~\rm mol$$
We do the same for N, H and O. We have 0.33 atoms of N,6.93 atoms of H and 1.32 atoms of O.
So the ratio is $5.6 : 0.33 : 6.93 : 1.32$.
We divide by $0.33$ and we have $17 : 1 : 21 : 4$. The empirical formula is $\ce{C17H21NO4}$.
Its molar mass is 303 g/mol. Now we find the quotient:
$$K= \frac{\text{Molar mass of the real formula}}{\text{Molar mass of the empirical formula}} =\frac{283}{303}\approx 1$$
So the molecular formula is $\ce{C17H21NO4}$. Is this correct?