<s>[INST] Infinite continued fraction expansion How can we find the first six partial quotients of the infinite continued fraction expansion of $\sqrt[3]2$?
 I know how to do this by expanding when we have a square root function... but I"m not sure what to do with a cubic root.
 [/INST] In response to André Nicolas's post, here's one way to use exact rational arithmetic.  Let $x_0 = 2^{1/3}$.
First note that for rationals $a, b, c$, we can check the sign of $a x_0^2 + b x_0 + c$.  The nontrivial case is where $a \ne 0$ and $b^2 - 4 a c > 0$.  Let 
$r_1 < r_2$ be the roots of $a x^2 + b x + c$, which in this case are real
and distinct.  Then $a x_0^2 + b x_0 + c$ has the same sign as $a$ iff either
$x_0 < r_1$ or $x_0 > r_2$, i.e. $2 < r_1^3$ or $2 > r_2^3$.  Express these in terms of square roots, isolate the square roots: you get inequalities of the form
$\sqrt{b^2-4ac} < R$ or $\sqrt{b^2-4ac} > R$, where $R$ is rational.  If $R > 0$, square both sides and you have a rational expression to check.
Now let the continued fraction be $x_0 = [a_0; a_1, a_2, \ldots]$ and the 
$k$'th remainder be $x_k = [a_k; a_{k+1}, a_{k+2}, \ldots]$.  We have
$a_k = \lfloor x_k \rfloor$ (which, by the previous paragraph, can be computed
using rational arithmetic),
and $x_{k} = a_k + 1/x_{k+1}$ so
$x_{k+1} = 1/(x_k - a_k)$.  Now if $x_k = c_k x_0^2 + d_k x_0 + e_k$,
$$x_{k+1} = \dfrac{1}{c_k x_0^2 + d_k x_0 + e_k - a_k} = c_{k+1} x_0^2 + d_{k+1} x_0 + e_{k+1}$$
where $c_{k+1},d_{k+1},e_{k+1}$ are rational expressions in $c_k,d_k,e_k-a_k$.
In this case
$$\eqalign{a_0 &= 1 \cr
 x_1 &= 2^{2/3} + 2^{1/3} + 1\cr
 a_1 &= 3\cr
 x_2 &= \dfrac{3}{10} 2^{2/3} + \dfrac{2}{5} 2^{1/3} + \dfrac{1}{5}\cr
 a_2 &= 1\cr
 x_3 &= \dfrac{4}{3} 2^{2/3} + \dfrac{5}{3} 2^{1/3} + \dfrac{4}{3} \cr
 a_3 &= 5\cr}$$
etc
</s>