Show that there is a unique sequence of positive integers $(a_n)$ satisfying $a_1=1,a_2=2,a_4=12,a_{n+1}a_{n-1}=a_n^2\pm 1 $ Show that there is a unique sequence of positive integers $(a_n)$ satisfying the following conditions.
$$a_1=1,a_2=2,a_4=12,a_{n+1}a_{n-1}=a_n^2\pm 1$$  
I approached the problem to find out,  
$a_3=4 \pm 1$
$a_2a_4=a_3^2\pm1 \implies 24\mp1=a_3^2 \implies a_3=5$ as $a_n \in \mathbb{N}$
I could not do anything more. Even, I could not understand what should I show to prove that the sequence is unique. Please help.

Suppose that after $a_n$, that both possible values of $a_{n+1}$ , $\frac{a_n\,^2 - 1} {a_{n-1}}$ and $\frac{a_n\,^2 + 1} {a_{n-1}}$, are both integers.
Then $$\begin{cases} a_{n-1} | a_n\,^2 - 1 \\ a_{n-1} | a_n\,^2 + 1 \end{cases}$$
So $a_{n-1}$ can only be $1$ or $2$ if the sequence forks into to valid sequences after $a_n$.  So if the sequence is increasing, then it is unique for $a_{n-1} > 2$.
For existence, just look at the sequence mechanically first:
$$\begin{array} {c|c} n & a_n \\ \hline 1 & 1 \\ 2 & 2 \\ 3 & 5 \\ 4 & 12 \\ 5 & 29 \\ 6 & 70 \\ 7 & 169 \end{array}$$
It seems to be geometric with a ratio of $\frac {169} {70} \text{ is about } 2.414 \text{ is about } 1 + \sqrt{2}$.  Checking $a_n = x(1 + \sqrt{2})^n + y (1 - \sqrt{2})^n$ gets $x = 2^{-3/2}, y = -2^{-3/2}$.
Final verification of existence, put value of $a_n$ into:
$$a_n = \frac{a_{n-1}\,^2 - (-1)^n} {a_{n-2}}$$
