Show that $p_n=q_{n-1}=\frac{\alpha^n-\beta^n}{\alpha-\beta}$ 
If $\frac{p_n}{q_n}$ be the nth convergent of the simple continued fraction $$\cfrac{1}{a+\cfrac{1}{a+\cfrac{1}{a+\ddots}}}$$ show that $$p_n=q_{n-1}=\frac{\alpha^n-\beta^n}{\alpha-\beta}$$ where, $\alpha$, $\beta$
   are the roots of the equation $x^2-ax-1=0$

Attempt 
I can solve the 1st part of the problem. 
We have $p_n=ap_{n-1}+p_{n-2}$ and $q_n=aq_{n-1}+q_{n-2}$.
Also $\frac{p_n}{q_n}=\frac{1}{a+\frac{p_{n-1}}{q_{n-1}}}$. Equation the numerator we get $p_n=q_{n-1}$.
Now how to get the 2nd part of the problem. 
 A: As you have already noted, we have $p_n = a p_{n - 1} + p_{n - 2}$ and $q_n = a q_{n - 1} + q_{n - 2}$. Moreover (as Daniel Fischer wrote in his comment already) we start with $p_0 = 0$, $p_1 = 1$. Let $\alpha, \beta$ be the roots of $X^2 - aX - 1$. The rest is induction: 
For $n = 0$, we have $\frac{\alpha^0 - \beta^0}{\alpha - \beta} = 0 = p_0$. 
For $n = 1$, we have $\frac{\alpha - \beta}{\alpha - \beta} = 1 = p_1$. 
Let now $n > 1$. We have $p_n = a p_{n - 1} + p_{n - 2} = a \frac{\alpha^{n - 1} - \beta^{n - 1}}{\alpha - \beta} + \frac{\alpha^{n - 2} - \beta^{n - 2}}{\alpha - \beta}$ by the induction hypothesis. So $$(\alpha - \beta) p_n = a \alpha^{n - 1} + \alpha^{n - 2} - a\beta^{n - 1} - \beta^{n - 2}$$
By assumption we have $\alpha^2 - a \alpha - 1 = 0$ and so $a \alpha = \alpha^{2} - 1$ and similarly for $\beta$. Plugging this in the above equation we get: $$(\alpha - \beta) p_n = (\alpha^2 - 1) \alpha^{n - 2} + \alpha^{n - 2} - (\beta^2 - 1) \beta^{n - 2} - \beta^{n - 2} = \alpha^n - \beta^n$$
and hence $p_n = \frac{\alpha^n - \beta^n}{\alpha - \beta}$, which was to prove. 
You might be interested to know that for $a = 1$ one can use the continued fraction $$1 + \frac{1}{1 + \frac{1}{1 + \cdots}}$$to approximate the golden ratio $\phi = \frac{1 + \sqrt{5}}{2}$ (which is in fact a root of $X^2 - X - 1$). 
En effet, by staring at the fraction it is clear that it is bounded form below by $0$ and from above by $2$. Moreover, it is monotonically decreasing after some point, hence the fraction converges. We have $\frac{p_n}{q_n} = 1 + \frac{1}{\frac{p_{n - 1}}{q_{n - 1}}}$ and taking the limit $x := \lim_{n \rightarrow \infty} \frac{p_n}{q_n}$ we get $x = 1 + \frac{1}{x}$ or equivalently $x^2 - x - 1 = 0$. Solving this we get $x = \frac{1 + \sqrt{5}}{2}$ (for the limit must be positive). 
