$N \in \mathbb{N}$ is not a square, show that the continued fraction expansion of $\sqrt N/\lfloor\sqrt N\rfloor$ is $[1,\overline{a_1,a_2,\dots,2}]$ 
Let $N \in \mathbb{N}$ not a square, show that the continued fraction expansion of $\sqrt{N}/\lfloor\sqrt{N}\rfloor$ is $[1,\overline{a_1,a_2,\dots,2}]$.

My notations: the fractional part of $a$ is denoted by $\{a\}$. Let $N_1 < N < N_2$, where $N_1$ and $N_2$ are squares the closest to $N$.
$\sqrt{N}/\lfloor\sqrt{N}\rfloor = (\sqrt{N} - \lfloor\sqrt{N}\rfloor+\lfloor\sqrt{N}\rfloor)/\lfloor\sqrt{N}\rfloor = 1 + (\sqrt{N} - \lfloor\sqrt{N}\rfloor)/\lfloor\sqrt{N}\rfloor$.
Now I'm stuck at the further steps.
 A: In the algorithm of writing a continued fraction $[a_0,\overline{a_1,\ldots,2a_0}]$ of any square root $\sqrt{N}$, we have that $a_0=\lfloor\sqrt{N}\rfloor$. Now the first part is writing
$$\begin{align*}\frac{\sqrt{N}}{\lfloor\sqrt{N}\rfloor}&=\frac{a_0+\frac{1}{a_1+\frac{1}{\ddots}}}{a_0}\\
&=1+\frac{1}{a_0a_1+\frac{a_0}{a_2+\frac{1}{\ddots}}}\\
&=1+\frac{1}{a_0a_1+\frac{1}{\frac{1}{a_0}\left(a_2+\frac{1}{\ddots}\right)}}\\
&=\ldots\\
&=1+\frac{1}{a_0a_1+\frac{1}{\frac{\ddots}{\frac{1}{a_0}\left(a_n+\frac{1}{\ddots}\right)}}}.\end{align*}$$
Since $a_n=2a_0$, we get that $a_0$ gets divided by itself at the "end" of the repetition shown above. Hence, the continued fraction is now $[1,\overline{b_1,\ldots,b_{n-1},2}]$ with $b_i\in\mathbb{Z}$.
Note that the case where eventually somewhere in the continued fraction $a_0\left(a_k+\frac{1}{\ddots}\right)$ can't appear because then that part would be $a_0a_k+\frac{a_0}{\ddots}$ which is not part of the partial fraction for we need the "$1$ over something" in each "layer" of the continued fraction.
