<s>[INST] Why is $\sqrt{3}=[1;1,2,1,2,\dots]$? 
Why is $\sqrt{3}=[1;1,2,1,2,\dots]$ ?

$\displaystyle[1;1,2,1,2,\dots]=1+\frac{1}{[1;2,1,2,\dots]}=1+\frac{1}{1+\frac{1}{2+\frac{1}{[1;2,1,2,\dots]}}}$
If I set $x=[1;2,1,2,\dots]$ then;
$\frac{x+1}{x}=\frac{5x+2}{3x+1}$
with solutions $x_{1,2}=\frac{1\pm\sqrt{3}}{2}$
what did go wrong ?
 [/INST] Let's begin by computing $y=[1;2,1,2,\cdots]$.  This is $$1+\frac{1}{2+\frac{1}{1+\frac{1}{2+\ddots}}}.$$
Now, $\frac{1}{y-1}$ equals $$2+\frac{1}{1+\frac{1}{2+\ddots}}.$$
Then, $$\frac{1}{\frac{1}{y-1}-2}=y.$$
Simplifying the fractions results in $2y^2-2y-1$.  Solving for $y$ results in $\frac{1\pm\sqrt{3}}{2}$.
Since $x=1+\frac{1}{y}$, you get that $x=\pm\sqrt{3}$.
</s>