# Elementary Number Theory: Consider the finite continued fraction:

The continued fraction where $a_0=1, a_1=a_2=\cdots=a_k=2$. Show that

$q_k=p_{k-1}+q_{k-1}$ and $p_k=2q_k-p_{k-1},$

given that $$p_0=a_0, p_1=a_0a_1+1,p_k=a_kp_{k-1}+p_{k-2}$$ and

$$q_0=1,q_1=a_1,q_k=a_kq_{k-1}+q_{k-2}.$$