# Continued fractions proofs

I need help with the following proofs:

Given a continued fraction $[a_0,a_1,...,a_N]$ ($a_i$ for all $i$ is a natural number).

We define as well:$p_{-1}=1$ ,$q_{-1}=0$ ,$p_0=a_0$ ,$q_0=1$ , and by recursion:

$p_n=a_np_{n-1}+p_{n-2}$ , $q_n=a_nq_{n-1}+q_{n-2}$

Prove:

1.$p_nq_{n-1}-p_{n-1}q_n=(-1)^{n-1}$

2.$p_nq_{n-2}-p_{n-2}q_n=(-1)^na_n$

I know that it should be done with induction but I really can't solve it..

$$d_n = p_nq_{n-1} - q_np_{n-1} = q_{n-1}(a_np_{n-1} + p_{n-2}) - p_{n-1}(a_nq_{n-1} + q_{n-2}) = -(p_{n-1}q_{n-2} - q_{n-1}p_{n-2}) ,$$
$$p_0q_{-1} - p_{-1}q_0 = -1.$$
Then apply induction using $d_0 = -1$ and $d_n = - d_{n-1}$.