Proving continued fraction of $\sqrt{k^2 -1}$ is $$ I know that $a_0$ must be $k-1$ since the integer part is $\lfloor \sqrt{k^2 -1} \rfloor$ but am struggling on the repeated part.

You now consider
$$x_1=\frac1{\sqrt{k^2-1}-(k-1)}=\frac{\sqrt{k^2-1}+(k-1)}{k^2-1-(k-1)^2}
=\frac{\sqrt{k^2-1}+(k-1)}{2k-2}.$$
As the numerator of this fraction is between $2k-2$ and $2k-1$ its integer part is $1$.
Now consider
$$x_2=\frac1{x_1-1}=\frac{2k-2}{\sqrt{k^2-1}-(k-1)}=\sqrt{k^2-1}+k-1.$$
Its integer part is $2k-2$. Then
$$x_3=\frac1{x_2-(2k-2)}=x_1$$
and we have got into a cycle.
