Question
In a cubic lattice of $\ce{XYZ},$ $\ce{X}$ atoms are present at all corners except one corner which is occupied by $\ce{Y}$ atoms. $\ce{Z}$ atoms are present at face centres. What is the formula of compound?
Answer
$\ce{X2YZ24}$
My solution
Let the number of atoms in a unit cell be $N.$ Then
$$ \begin{align} N(\ce{X}) &= 7 × \frac{1}{8} = \frac{7}{8}\\ N(\ce{Y}) &= 1 × \frac{1}{8} = \frac{1}{8}\\ N(\ce{Z}) &= 6 × \frac{1}{2} = 3 \end{align} $$
Therefore, the ratio would be
$$N(\ce{X}):N(\ce{Y}):N(\ce{Z}) = \frac{7}{8}:\frac{1}{8}:3,$$
which is the same thing as $7:1:24.$ So, the formula is $\ce{X7YZ24}.$
What am I doing wrong?