Sequence in which adding 2 produces a square












7














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?










share|cite|improve this question
























  • First tought in my mind: did you try induction?
    – Will M.
    Nov 20 at 17:58










  • It's not that easy.
    – Craig Feinstein
    Nov 20 at 18:23










  • It's true up to $n=35$, according to Mathematica, so it's probably true in general.
    – Patrick Stevens
    Nov 20 at 21:43










  • @PatrickStevens evidently the indicated square roots satisfy the same type of recurrence; I put a brief output as answer, including the square roots
    – Will Jagy
    Nov 20 at 21:48










  • $sqrt frac{x_{n+1}-2}{5})$ seems to be the sequence A101361
    – René Gy
    Nov 20 at 21:49


















7














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?










share|cite|improve this question
























  • First tought in my mind: did you try induction?
    – Will M.
    Nov 20 at 17:58










  • It's not that easy.
    – Craig Feinstein
    Nov 20 at 18:23










  • It's true up to $n=35$, according to Mathematica, so it's probably true in general.
    – Patrick Stevens
    Nov 20 at 21:43










  • @PatrickStevens evidently the indicated square roots satisfy the same type of recurrence; I put a brief output as answer, including the square roots
    – Will Jagy
    Nov 20 at 21:48










  • $sqrt frac{x_{n+1}-2}{5})$ seems to be the sequence A101361
    – René Gy
    Nov 20 at 21:49
















7












7








7


4





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?










share|cite|improve this question















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?







sequences-and-series fibonacci-numbers






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 21 at 22:17









René Gy

1,086613




1,086613










asked Nov 20 at 17:54









Craig Feinstein

387321




387321












  • First tought in my mind: did you try induction?
    – Will M.
    Nov 20 at 17:58










  • It's not that easy.
    – Craig Feinstein
    Nov 20 at 18:23










  • It's true up to $n=35$, according to Mathematica, so it's probably true in general.
    – Patrick Stevens
    Nov 20 at 21:43










  • @PatrickStevens evidently the indicated square roots satisfy the same type of recurrence; I put a brief output as answer, including the square roots
    – Will Jagy
    Nov 20 at 21:48










  • $sqrt frac{x_{n+1}-2}{5})$ seems to be the sequence A101361
    – René Gy
    Nov 20 at 21:49




















  • First tought in my mind: did you try induction?
    – Will M.
    Nov 20 at 17:58










  • It's not that easy.
    – Craig Feinstein
    Nov 20 at 18:23










  • It's true up to $n=35$, according to Mathematica, so it's probably true in general.
    – Patrick Stevens
    Nov 20 at 21:43










  • @PatrickStevens evidently the indicated square roots satisfy the same type of recurrence; I put a brief output as answer, including the square roots
    – Will Jagy
    Nov 20 at 21:48










  • $sqrt frac{x_{n+1}-2}{5})$ seems to be the sequence A101361
    – René Gy
    Nov 20 at 21:49


















First tought in my mind: did you try induction?
– Will M.
Nov 20 at 17:58




First tought in my mind: did you try induction?
– Will M.
Nov 20 at 17:58












It's not that easy.
– Craig Feinstein
Nov 20 at 18:23




It's not that easy.
– Craig Feinstein
Nov 20 at 18:23












It's true up to $n=35$, according to Mathematica, so it's probably true in general.
– Patrick Stevens
Nov 20 at 21:43




It's true up to $n=35$, according to Mathematica, so it's probably true in general.
– Patrick Stevens
Nov 20 at 21:43












@PatrickStevens evidently the indicated square roots satisfy the same type of recurrence; I put a brief output as answer, including the square roots
– Will Jagy
Nov 20 at 21:48




@PatrickStevens evidently the indicated square roots satisfy the same type of recurrence; I put a brief output as answer, including the square roots
– Will Jagy
Nov 20 at 21:48












$sqrt frac{x_{n+1}-2}{5})$ seems to be the sequence A101361
– René Gy
Nov 20 at 21:49






$sqrt frac{x_{n+1}-2}{5})$ seems to be the sequence A101361
– René Gy
Nov 20 at 21:49












2 Answers
2






active

oldest

votes


















4














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)=4left(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$$







share|cite|improve this answer























  • The step 2nd line of the step where you computed $z_{n+1}z_{n-2}$ seems to be wrong. The 4 at the end doesn't seem to belong.
    – Craig Feinstein
    Nov 21 at 17:24










  • It is difficult to follow the steps. Can you please provide more details?
    – Craig Feinstein
    Nov 21 at 17:34










  • @CraigFeinstein I have edited the lines in an attempt to be more clear.
    – René Gy
    Nov 21 at 20:08










  • So not only $x_n +2$ is a square but also $(x_n-2)/5$ must be a square?
    – Craig Feinstein
    Nov 22 at 3:15






  • 1




    @CraigFeinstein Right, we have $frac{x_n-2}{5}=F_{2F_{n-1}}^2$.
    – René Gy
    Nov 22 at 16:36





















1














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





share|cite|improve this answer























    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3006665%2fsequence-in-which-adding-2-produces-a-square%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    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)=4left(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$$







    share|cite|improve this answer























    • The step 2nd line of the step where you computed $z_{n+1}z_{n-2}$ seems to be wrong. The 4 at the end doesn't seem to belong.
      – Craig Feinstein
      Nov 21 at 17:24










    • It is difficult to follow the steps. Can you please provide more details?
      – Craig Feinstein
      Nov 21 at 17:34










    • @CraigFeinstein I have edited the lines in an attempt to be more clear.
      – René Gy
      Nov 21 at 20:08










    • So not only $x_n +2$ is a square but also $(x_n-2)/5$ must be a square?
      – Craig Feinstein
      Nov 22 at 3:15






    • 1




      @CraigFeinstein Right, we have $frac{x_n-2}{5}=F_{2F_{n-1}}^2$.
      – René Gy
      Nov 22 at 16:36


















    4














    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)=4left(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$$







    share|cite|improve this answer























    • The step 2nd line of the step where you computed $z_{n+1}z_{n-2}$ seems to be wrong. The 4 at the end doesn't seem to belong.
      – Craig Feinstein
      Nov 21 at 17:24










    • It is difficult to follow the steps. Can you please provide more details?
      – Craig Feinstein
      Nov 21 at 17:34










    • @CraigFeinstein I have edited the lines in an attempt to be more clear.
      – René Gy
      Nov 21 at 20:08










    • So not only $x_n +2$ is a square but also $(x_n-2)/5$ must be a square?
      – Craig Feinstein
      Nov 22 at 3:15






    • 1




      @CraigFeinstein Right, we have $frac{x_n-2}{5}=F_{2F_{n-1}}^2$.
      – René Gy
      Nov 22 at 16:36
















    4












    4








    4






    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)=4left(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$$







    share|cite|improve this 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)=4left(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$$








    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Nov 21 at 21:54

























    answered Nov 21 at 1:11









    René Gy

    1,086613




    1,086613












    • The step 2nd line of the step where you computed $z_{n+1}z_{n-2}$ seems to be wrong. The 4 at the end doesn't seem to belong.
      – Craig Feinstein
      Nov 21 at 17:24










    • It is difficult to follow the steps. Can you please provide more details?
      – Craig Feinstein
      Nov 21 at 17:34










    • @CraigFeinstein I have edited the lines in an attempt to be more clear.
      – René Gy
      Nov 21 at 20:08










    • So not only $x_n +2$ is a square but also $(x_n-2)/5$ must be a square?
      – Craig Feinstein
      Nov 22 at 3:15






    • 1




      @CraigFeinstein Right, we have $frac{x_n-2}{5}=F_{2F_{n-1}}^2$.
      – René Gy
      Nov 22 at 16:36




















    • The step 2nd line of the step where you computed $z_{n+1}z_{n-2}$ seems to be wrong. The 4 at the end doesn't seem to belong.
      – Craig Feinstein
      Nov 21 at 17:24










    • It is difficult to follow the steps. Can you please provide more details?
      – Craig Feinstein
      Nov 21 at 17:34










    • @CraigFeinstein I have edited the lines in an attempt to be more clear.
      – René Gy
      Nov 21 at 20:08










    • So not only $x_n +2$ is a square but also $(x_n-2)/5$ must be a square?
      – Craig Feinstein
      Nov 22 at 3:15






    • 1




      @CraigFeinstein Right, we have $frac{x_n-2}{5}=F_{2F_{n-1}}^2$.
      – René Gy
      Nov 22 at 16:36


















    The step 2nd line of the step where you computed $z_{n+1}z_{n-2}$ seems to be wrong. The 4 at the end doesn't seem to belong.
    – Craig Feinstein
    Nov 21 at 17:24




    The step 2nd line of the step where you computed $z_{n+1}z_{n-2}$ seems to be wrong. The 4 at the end doesn't seem to belong.
    – Craig Feinstein
    Nov 21 at 17:24












    It is difficult to follow the steps. Can you please provide more details?
    – Craig Feinstein
    Nov 21 at 17:34




    It is difficult to follow the steps. Can you please provide more details?
    – Craig Feinstein
    Nov 21 at 17:34












    @CraigFeinstein I have edited the lines in an attempt to be more clear.
    – René Gy
    Nov 21 at 20:08




    @CraigFeinstein I have edited the lines in an attempt to be more clear.
    – René Gy
    Nov 21 at 20:08












    So not only $x_n +2$ is a square but also $(x_n-2)/5$ must be a square?
    – Craig Feinstein
    Nov 22 at 3:15




    So not only $x_n +2$ is a square but also $(x_n-2)/5$ must be a square?
    – Craig Feinstein
    Nov 22 at 3:15




    1




    1




    @CraigFeinstein Right, we have $frac{x_n-2}{5}=F_{2F_{n-1}}^2$.
    – René Gy
    Nov 22 at 16:36






    @CraigFeinstein Right, we have $frac{x_n-2}{5}=F_{2F_{n-1}}^2$.
    – René Gy
    Nov 22 at 16:36













    1














    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





    share|cite|improve this answer




























      1














      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





      share|cite|improve this answer


























        1












        1








        1






        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





        share|cite|improve this answer














        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






        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 20 at 21:53

























        answered Nov 20 at 21:36









        Will Jagy

        101k599199




        101k599199






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3006665%2fsequence-in-which-adding-2-produces-a-square%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?