# 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$

• $log(1+\frac{1}{n}) \ne -log(n)$ – Nate Mar 2 '15 at 15:01
• $log(1+\frac{1}{n}) = log(n+1) - log(n)$ – mastrok Mar 2 '15 at 15:02
• $b_{n+1}-b_n-\log(n+1)=b_n-b_{n-1}-\log(n)$ – Empy2 Mar 2 '15 at 15:14

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!}$$

• Thank you. I really didn't understand your solution, what is $N$? and why did you wrote this : $$(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}$$ – No one Mar 2 '15 at 15:28
• @Drupalist: $N$ is any natural number $N\geq 1$. I am just exploiting some telescopic products. – Jack D'Aurizio Mar 2 '15 at 15:31
• Is there any way to calculate the number of zeros in the right side of the $a_{100}$? – No one Mar 2 '15 at 15:33
• @Drupalist: the greatest power of $5$ that divides $100!$ is $5^{24}$ while the greatest power of $2$ that divides $2^{100}\cdot 100!$ is $2^{197}$, hence $a_{100}$ has $24$ trailing zeroes. – Jack D'Aurizio Mar 2 '15 at 15:48
• That is quite right, thanks alot – No one Mar 2 '15 at 16:01

$$\frac{a_{n-1}}{a_n} n = \frac{a_{n}}{a_{n+1}} (n+1)$$
one possible solution is $\frac{a_{n-1}}{a_n} = \frac{c}{n}$
which implies $$a_n = \frac{n!}{c^n}$$
From your initial conditions, $c=\frac{1}{2}$, $$a_n = 2^n n!$$
• I updated the question and included the $a_0,a_1$, what is $c$? and what is its value? – No one Mar 2 '15 at 15:30
• Just by substituting $a_1 = 2$, you will get $c=\frac{1}{2}$ – mastrok Mar 2 '15 at 15:31
• Your solution is much more shorter than Jack, and resulted the same answer, how did you find out that the one possible solution is $\frac{a_{n-1}}{a_n} = \frac{c}{n}$ ? – No one Mar 2 '15 at 15:42
• You can observe that $\frac{a_{n-1}}{a_n}n$ is independent of $n$ from the first equation. Then assume that it equals some constant $\frac{a_{n-1}}{a_n}n=c$, you will get that. – mastrok Mar 2 '15 at 15:45