An infinite sequence is given by $x_1=2, x_2=7, x_{n+1} = 4x_n - x_{n-1}$ for all $n \geq 2$. Does there exist a perfect square in this sequence?
HIDE: Remark During the test the initial value of $x_1$ was given as $1$, thus the problem was not gradedProblem
Source:
Tags: Sequence, algebra
22.05.2022 11:29
22.05.2022 14:50
I will just derive the closed form. We proceed to find the general closed form by taking the GF (Generating function) of the sequence $\{x_n\}$, I'll label $a_0=2$ , $a_1=7$ as the seed values. Denote $A(x)=\sum_{n=0}^{\infty}a_nx^n$ as the GF of $\{a_n\}$. Then, \begin{align*} A(x)=\sum_{n=0}^{\infty}a_nx^n &=2+7x+\sum_{n=2}a_nx^n\\ &=2+7x+x\left(\sum_{n=1}^{\infty}a_{n+1}x^n\right)\\ &=2+7x+x\left(\sum_{n=1}^{\infty}(4a_n-a_{n-1})x^n\right)\\ &=2+7x+x\left(4\sum_{n=1}^{\infty}a_nx^n-x\sum_{n=0}^{\infty}a_nx^n\right)\\ &=2+7x+x\left(4(A(x)-2)-xA(x)\right)\\ &\implies A(x)=\frac{2-x}{x^2-4x+1} \end{align*} So, the GF of $\{a_n\}$ is $\frac{2-x}{x^2-4x+1}$, next let $r_1:=2+\sqrt 3$ and $r_2=2-\sqrt{3}$ denote the reals roots of $x^2-4x+1$, with this we can write $A(x)$ as follows, $$A(x)=-\frac{1}{2}\left(\frac{(x-r_1)+(x-r_2)}{(x-r_1)(x-r_2)}\right)=\frac{1}{2}\left(\frac{1}{r_1-x}+\frac{1}{r_2-x}\right)=\frac{1}{2}\left(\frac{\frac{1}{r_1}}{1-\frac{x}{r_1}}+\frac{\frac{1}{r_2}}{1-\frac{x}{r_2}}\right)$$Now using properties of geometric series we can expand out $A(x)$ as $$A(x)=\sum_{n=0}^{\infty}\frac{1}{2}\left(\frac{1}{r_1^{n+1}}+\frac{1}{r_2^{n+1}}\right)x^n$$But by Vieta's relations $r_1r_2=1$, thus, $\frac{1}{2}\left(\frac{1}{r_1^{n+1}}+\frac{1}{r_2^{n+1}}\right)=\frac{r_1^{n+1}+r_2^{n+1}}{2}$, thus $$A(x)=\sum_{n=0}^{\infty}a_nx^n=\left(\frac{(2+\sqrt{3})^{n+1}+(2-\sqrt{3})^{n+1}}{2}\right)x^n\implies\boxed{x_n=\frac{(2+\sqrt{3})^n+(2-\sqrt{3})^n}{2}}\qquad\blacksquare$$
24.05.2022 01:38
amar_04 wrote: I will just derive the closed form. We proceed to find the general closed form by taking the GF (Generating function) of the sequence $\{x_n\}$, I'll label $a_0=2$ , $a_1=7$ as the seed values. Denote $A(x)=\sum_{n=0}^{\infty}a_nx^n$ as the GF of $\{a_n\}$. Then, \begin{align*} A(x)=\sum_{n=0}^{\infty}a_nx^n &=2+7x+\sum_{n=2}a_nx^n\\ &=2+7x+x\left(\sum_{n=1}^{\infty}a_{n+1}x^n\right)\\ &=2+7x+x\left(\sum_{n=1}^{\infty}(4a_n-a_{n-1})x^n\right)\\ &=2+7x+x\left(4\sum_{n=1}^{\infty}a_nx^n-x\sum_{n=0}^{\infty}a_nx^n\right)\\ &=2+7x+x\left(4(A(x)-2)-xA(x)\right)\\ &\implies A(x)=\frac{2-x}{x^2-4x+1} \end{align*} So, the GF of $\{a_n\}$ is $\frac{2-x}{x^2-4x+1}$, next let $r_1:=2+\sqrt 3$ and $r_2=2-\sqrt{3}$ denote the reals roots of $x^2-4x+1$, with this we can write $A(x)$ as follows, $$A(x)=-\frac{1}{2}\left(\frac{(x-r_1)+(x-r_2)}{(x-r_1)(x-r_2)}\right)=\frac{1}{2}\left(\frac{1}{r_1-x}+\frac{1}{r_2-x}\right)=\frac{1}{2}\left(\frac{\frac{1}{r_1}}{1-\frac{x}{r_1}}+\frac{\frac{1}{r_2}}{1-\frac{x}{r_2}}\right)$$Now using properties of geometric series we can expand out $A(x)$ as $$A(x)=\sum_{n=0}^{\infty}\frac{1}{2}\left(\frac{1}{r_1^{n+1}}+\frac{1}{r_2^{n+1}}\right)x^n$$But by Vieta's relations $r_1r_2=1$, thus, $\frac{1}{2}\left(\frac{1}{r_1^{n+1}}+\frac{1}{r_2^{n+1}}\right)=\frac{r_1^{n+1}+r_2^{n+1}}{2}$, thus $$A(x)=\sum_{n=0}^{\infty}a_nx^n=\left(\frac{(2+\sqrt{3})^{n+1}+(2-\sqrt{3})^{n+1}}{2}\right)x^n\implies\boxed{x_n=\frac{(2+\sqrt{3})^n+(2-\sqrt{3})^n}{2}}\qquad\blacksquare$$ How would you finish the problem after deriving the closed form?