A recurrence relation problem: $\frac {a_{n-1}.a_{n+1}} {a_n^2} = 1 + \frac 1 n$ I need to solve this recurrence problem to find $a_n$
$\dfrac {a_{n-1}.a_{n+1}} {a_n^2} = 1 + \dfrac 1 n$
It is what I tried so far:
$$\log (\dfrac {a_{n-1}.a_{n+1}} {a_n^2}) = \log(1 + \dfrac 1 n)$$
$$=> \log a_{n-1} + log a_{n+1} - 2log a_{n} = -\log n$$
$$\log a_n = b_n ---assume$$
$$b_{n-1}+b_{n+1}-2b_n = -\log n$$
This is a second order recurrence relation. Now to calculate $b_n^h$ (the general solution) :
$$b_{n+1} - 2b_n+b_{n-1} = 0$$
$$b_n = Cr^n$$
$$Cr^{n+1} - 2Cr^n+Cr^{n-1} = 0$$
$$ r^2 - 2r+1 = 0$$
$$r_1 = 1, r_2 = 1$$
$$a_n^h = 1^n + n (1^n)$$
My first question is, did I do every thing right in calculating $a_n^h$ so far?
The second problem is I don't know how to calculate the private solution, $a_n^p$ I mean. the $f(n) = -\log n$ and I don't know what  $a_n^p$ should be.

UPDATE
I forgot to include that $a_0 =1 , a_1 = 2$

We have:
$$(N+1)=\prod_{n=1}^{N}\frac{n+1}{n}=\prod_{n=1}^{N}\frac{a_{n-1}\cdot a_{n+1}}{a_n^2}=\frac{a_0}{a_N}\cdot\frac{a_{N+1}}{a_1}$$
hence:
$$\frac{a_{N+1}}{a_N}=\frac{a_1}{a_0}(N+1) $$
and:
$$\frac{a_{M+1}}{a_1}=\prod_{N=1}^{M}\frac{a_{N+1}}{a_N}=\prod_{N=1}^{M}\frac{a_1}{a_0}(N+1)=\left(\frac{a_1}{a_0}\right)^M \cdot (M+1)!$$
so:
$$ a_{M+1} = a_0\left(\frac{a_1}{a_0}\right)^{M+1} (M+1)! $$
and finally:

$$ a_n = a_0 \left(\frac{a_1}{a_0}\right)^n n!$$

With the given constraints, $a_0=1,a_1=2$ it follows that:
$$ a_n = \color{red}{2^n n!}$$
