Sequence in which adding 2 produces a square

145 Views Asked by At

Consider the sequence defined by $x_1=2$, $x_2=x_3=7$, $x_{n+1}=x_{n}x_{n-1}-x_{n-2}$. Then $x_4=7 \cdot 7 - 2 = 47, x_5=47 \cdot 7 - 7=322, x_6=322 \cdot 47 - 7 =15127, x_7=15127 \cdot 322 -47=4870847,x_8=4870847 \cdot 15127-322=73681302247.$

My spreadsheet cannot calculate any more, but notice that $x_n+2$ is always square: $\sqrt{x_4+2}=7$, $\sqrt{x_5+2}=18$, $\sqrt{x_6+2}=123$, $\sqrt{x_7+2}=2207$,$\sqrt{x_8+2}=271443.$ Is this a coincidence?

2

There are 2 best solutions below

5
On BEST ANSWER

We have \begin{align*} x_{n+1}+x_{n-2}&=x_{n}x_{n-1}\\ \end{align*} then \begin{align*} x_{n+1}x_{n-2}&=x_{n}x_{n-1}x_{n-2}-x_{n-2}^2\\ &=x_n(x_{n}+x_{n-3})-x_{n-2}^2\\ &=x_nx_{n-3}+x_{n}^2-x_{n-2}^2\\ \end{align*} then by telescoping \begin{align*} x_{n+1}x_{n-2}&=x_4x_1+x_n^2+x_{n-1}^2-x_3^2-x_2^2\\ x_{n+1}x_{n-2}&=x_n^2+x_{n-1}^2-4\\ \end{align*} Now we let $x_n=z_n-2$. We then have

\begin{align*} z_{n+1}z_{n-2}-2z_{n+1}-2z_{n-2}+4&=z_n^2-4z_n+4+z_{n-1}^2-4z_{n-1}+4-4\\ z_{n+1}z_{n-2}&= z_n^2-4z_n+z_{n-1}^2-4z_{n-1}+2z_{n+1}+2z_{n-2}\\ z_{n+1}z_{n-2}&= z_n^2-4z_n+z_{n-1}^2-4z_{n-1}+2x_{n+1}+4+2z_{n-2}\\ \end{align*} But \begin{align*} x_{n+1}&=x_nx_{n-1}-x_{n-2}\\ &=(z_n-2)(z_{n-1}-2)-z_{n-2}+2 \end{align*} then by substitution and reduction, we find \begin{align*} z_{n+1}z_{n-2}&=(z_n+z_{n-1}-4)^2 \end{align*} from which a proof by induction easily follows.

Addition We show that $v_n=\sqrt{\frac{x_{n}-2}{5}}$ is A101361 (shifted).

We have $z_n = 5v_n^2+4$ and $x_n= 5v_n^2+2$. Then \begin{align*} z_{n+1}z_{n-2}&=(z_n+z_{n-1}+4)^2\\ (5v_{n+1}^2+4)(5v_{n-2}^2+4)&=(5v_{n}^2+5v_{n-1}^2+4)^2 \end{align*} which, after algebric manipulations, can be rearranged as $$5v_{n+1}^2v_{n-2}^2-5(v_{n}^2-v_{n-1}^2)=4\left(5v_{n}^2v_{n-1}^2 +2v_n^2 +2v_{n-1}^2 -(v_{n+1}^2+v_{n-2}^2)\right) \tag1 $$ On the other hand, we have \begin{align*} x_{n+1}+x_{n-2}&=x_nx_{n-1}\\ 5v_{n+1}^2+2+5v_{n-2}^2+2&=(5v_{n}^2+2)(5v_{n-1}^2+2) \end{align*} which can be simplified so that $$v_{n+1}^2+v_{n-2}^2 = 5v_{n}^2v_{n-1}^2 +2v_n^2 +2v_{n-1}^2 \tag2$$ Comparing (1) and (2), we see that it must be that $v_{n+1}v_{n-2}=v_n^2 - v_{n-1}^2$ which is the third-order nonlinear recursion that is satisfied by A101361. Moreover, it is easy to verify that the initial terms are equal (shifted). Also it is said in that OEIS page that $v_{n+1}= F_{2F_{n}}$, where $F_{n}$ is the Fibonacci number. Then we finally obtain a nice closed form for the OP sequence, in terms of Fibonacci and Lucas numbers:

$$ x_n = L_{2F_{n-1}}^2 -2$$

0
On

evidently the square root $s_n = \sqrt {x_n + 2}$ satisfies $$ s_{n+1} = s_n s_{n-1} - s_{n-2} $$ This tends to mean that a proof will be possible.

I think I screwed up the beginning labels for the square roots, but the sequence $2,3,3,7, 18, 123, 2207,...$ gives $3 \cdot 3 - 2 = 7,$ $3 \cdot 7 - 3 = 18,$ $7 \cdot 18 - 3 = 123,$ $18 \cdot 123 - 7 = 2207$

    4     47  49 int sqrt  7  sdiff -1
    5     322  324 int sqrt  18  sdiff 3
    6     15127  15129 int sqrt  123  sdiff 3
    7     4870847  4870849 int sqrt  2207  sdiff 7
    8     73681302247  73681302249 int sqrt  271443  sdiff 18
    9     358890350005878082  358890350005878084 int sqrt  599074578  sdiff 123
   10     26443508352314721186469779407  26443508352314721186469779409 int sqrt  162614600673847  sdiff 2207
   11      int sqrt  97418273275323406890123  sdiff 271443
   12      int sqrt  15841633607002416873831447357889638603  sdiff 599074578
   13      int sqrt  1543264591854508694059691789796980188767738307671225999544322  sdiff 162614600673847
   14      int sqrt  24447832222819253258096747170722821932737551721781484698278226571759551365824711139513519853772043  sdiff 97418273275323406890123
   15      int sqrt  37729473817076660931593825922523825105418958136330582571231905937822606847169782819188349018726882837649307587607345212765019953877746594614121187432973351243  sdiff 15841633607002416873831447357889638603