If $x+\frac{1}{y+\frac{1}{z+\frac13}}=\frac{118}{51}$ find $xyz$. I'm having a difficult time figuring out how to solve this algebra problem.

If $$x+\cfrac 1 {y+\cfrac 1 {z+\cfrac 1 3}}=\frac{118}{51}$$
find $xyz$.

 A: I will presume that $x,y,z$ are intended to be positive integers.
\begin{align}
\frac{118}{51} & = 2 + \frac{16}{51} = 2 + \frac 1 {\left( \frac{51}{16} \right)} = 2 + \cfrac 1 {3 + \cfrac 3 {16}} \\[15pt]
& = 2 + \cfrac 1 {3 + \cfrac 1 {\left( \frac{16} 3 \right)}} = 2 + \cfrac 1 {3 + \cfrac 1 {5 + \cfrac 1 3}}.
\end{align}
A: It is convenient to rewrite the left hand side a bit. This leads us to:
$$x + \frac{3z+1}{y(3z+1)+3} = \frac{118}{51}$$
From this it follows that the denominator on the left must be a multiple of 51, therefore:
$$y(3z+1)+3 = 51N$$ where N is a natural number. For the numerator we then find the equation:
$$51Nx + 3z + 1 = 118N$$
Let us try $N = 1$. We can easily verify that $z = 5$, $y=3$, $x=2$ is a solution. It is possible that other solutions exist. This should be carefully checked.
A: Write:
$\begin{align*}
   x + \frac{1}{y + \frac{1}{z + \frac{1}{3}}} - \frac{118}{51}
     &= 0 \\
   \frac{((153 x - 354) y + 153) z + (51 x - 118) y + 153 x - 303}
        {153 y z + 51 y + 153}
     &= 0
\end{align*}$
If the denominator isn't zero, the numerator must be:
$\begin{align*}
  ((153 x - 354) y + 153) z + (51 x - 118) y + 153 x - 303
    &= 0 \\
  153 x y z - 354 y z + 153 z + 51 x y - 118 y + 153 x - 303
    &= 0
\end{align*}$
It is seen that this can't be written as a function only of $x y z$. You can e.g. set any pair of variables to zero and get a matching value for the third, and that doesn't always make the denominator zero.
This has no solution.
