<s>[INST] How to find periodic continued fraction expansion of $\frac{\sqrt{7}}3$ 
How to find periodic continued fraction expansion of $\frac{\sqrt{7}}3$

Using this formula here (it begins in the middle of the page),

I obtained $\frac{\sqrt{7}}3=[0;1,\overline{7,2}]$
but how can I justify rigorously that the period starts at $a_2$, is it enough to say that $\bar{\zeta_2}=\frac{7-\sqrt{63}}{2}=-0.133\dots$, so it is between $0$ and $-1$ and this is not true for $\bar{\zeta_1}$
 [/INST] *

*We have that $\frac{\sqrt{7}}{3}$ is positive but less than one, hence its continued fraction starts with a $\color{red}{0}$;

*$\frac{3}{\sqrt{7}}=\frac{3\sqrt{7}}{7}=1+\frac{3\sqrt{7}-7}{7}$, hence the next element of the continued fraction is $\color{red}{1}$;

*$\frac{7}{3\sqrt{7}-7}=\frac{3\sqrt{7}+7}{2}=7+\frac{3\sqrt{7}-7}{2}$, hence the next element of the continued fraction is $\color{red}{7}$;

*$\frac{2}{3\sqrt{7}-7}=\frac{3\sqrt{7}+7}{7}=2+\frac{3\sqrt{7}-7}{7}$, hence the next element of the continued fraction is $\color{red}{2}$ and we are back to step 3.


This gives:

$$ \alpha = \frac{\sqrt{7}}{3} = [0;1,\overline{7,2}].$$

Now a double-check. If $\beta = [\overline{7,2}]$, then $\beta=[7;2,\beta]$ hence $\beta$ is a root of:
$$ \beta=7+\frac{1}{2+\frac{1}{\beta}}=\frac{15\beta+7}{2\beta+1}$$
hence:
$$ 2\beta^2+\beta = 15\beta + 7 $$
or $2\beta^2-14\beta-7=0$, from which:
$$ \beta = \frac{7+3\sqrt{7}}{2} $$
follows, and since $[0,1,\beta]=\frac{1}{1+\frac{1}{\beta}}=\frac{\beta}{\beta+1}$,
$$ [0,1,\overline{7,2}] = [0,1,\beta] = \frac{\sqrt{7}}{3}, $$
ok.
</s>