Finding a formula for a sequence











up vote
1
down vote

favorite












Let $a_n$ be a sequence such that $a_0=5$ and $a_{n}+a_{n+1}=3$ for all $n$ greater than $0$.



I defined a function $f(x)$ whose coefficients are same of that mentioned sequence.
I was able to get $$f(x)=displaystyle sum_{n=0}^infty [ 5 (-1)^n x^n + 3 (-1)^n x^{n+1} + 3 x^{2n+1} ] $$
But couldn't make it far.
How do you find a formula for $a_n$ given that $a_1$ is just $1$?










share|cite|improve this question
























  • Is there a typo, or $a_0$ is an exception which doesn't fit to the formula?
    – user376343
    Nov 24 at 9:56










  • @user376343 Just an exception.
    – Atiq Rahman
    Nov 24 at 9:58










  • With the given $a_0$ and the relation between terms is the sequence fully defined. I suggest to replace $a_0=5$ by $2$ so the problem is consistent, or to delete the information about $a_1.$
    – user376343
    Nov 24 at 10:04















up vote
1
down vote

favorite












Let $a_n$ be a sequence such that $a_0=5$ and $a_{n}+a_{n+1}=3$ for all $n$ greater than $0$.



I defined a function $f(x)$ whose coefficients are same of that mentioned sequence.
I was able to get $$f(x)=displaystyle sum_{n=0}^infty [ 5 (-1)^n x^n + 3 (-1)^n x^{n+1} + 3 x^{2n+1} ] $$
But couldn't make it far.
How do you find a formula for $a_n$ given that $a_1$ is just $1$?










share|cite|improve this question
























  • Is there a typo, or $a_0$ is an exception which doesn't fit to the formula?
    – user376343
    Nov 24 at 9:56










  • @user376343 Just an exception.
    – Atiq Rahman
    Nov 24 at 9:58










  • With the given $a_0$ and the relation between terms is the sequence fully defined. I suggest to replace $a_0=5$ by $2$ so the problem is consistent, or to delete the information about $a_1.$
    – user376343
    Nov 24 at 10:04













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Let $a_n$ be a sequence such that $a_0=5$ and $a_{n}+a_{n+1}=3$ for all $n$ greater than $0$.



I defined a function $f(x)$ whose coefficients are same of that mentioned sequence.
I was able to get $$f(x)=displaystyle sum_{n=0}^infty [ 5 (-1)^n x^n + 3 (-1)^n x^{n+1} + 3 x^{2n+1} ] $$
But couldn't make it far.
How do you find a formula for $a_n$ given that $a_1$ is just $1$?










share|cite|improve this question















Let $a_n$ be a sequence such that $a_0=5$ and $a_{n}+a_{n+1}=3$ for all $n$ greater than $0$.



I defined a function $f(x)$ whose coefficients are same of that mentioned sequence.
I was able to get $$f(x)=displaystyle sum_{n=0}^infty [ 5 (-1)^n x^n + 3 (-1)^n x^{n+1} + 3 x^{2n+1} ] $$
But couldn't make it far.
How do you find a formula for $a_n$ given that $a_1$ is just $1$?







sequences-and-series recurrence-relations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 24 at 23:05









rtybase

10.2k21433




10.2k21433










asked Nov 24 at 8:54









Atiq Rahman

593




593












  • Is there a typo, or $a_0$ is an exception which doesn't fit to the formula?
    – user376343
    Nov 24 at 9:56










  • @user376343 Just an exception.
    – Atiq Rahman
    Nov 24 at 9:58










  • With the given $a_0$ and the relation between terms is the sequence fully defined. I suggest to replace $a_0=5$ by $2$ so the problem is consistent, or to delete the information about $a_1.$
    – user376343
    Nov 24 at 10:04


















  • Is there a typo, or $a_0$ is an exception which doesn't fit to the formula?
    – user376343
    Nov 24 at 9:56










  • @user376343 Just an exception.
    – Atiq Rahman
    Nov 24 at 9:58










  • With the given $a_0$ and the relation between terms is the sequence fully defined. I suggest to replace $a_0=5$ by $2$ so the problem is consistent, or to delete the information about $a_1.$
    – user376343
    Nov 24 at 10:04
















Is there a typo, or $a_0$ is an exception which doesn't fit to the formula?
– user376343
Nov 24 at 9:56




Is there a typo, or $a_0$ is an exception which doesn't fit to the formula?
– user376343
Nov 24 at 9:56












@user376343 Just an exception.
– Atiq Rahman
Nov 24 at 9:58




@user376343 Just an exception.
– Atiq Rahman
Nov 24 at 9:58












With the given $a_0$ and the relation between terms is the sequence fully defined. I suggest to replace $a_0=5$ by $2$ so the problem is consistent, or to delete the information about $a_1.$
– user376343
Nov 24 at 10:04




With the given $a_0$ and the relation between terms is the sequence fully defined. I suggest to replace $a_0=5$ by $2$ so the problem is consistent, or to delete the information about $a_1.$
– user376343
Nov 24 at 10:04










3 Answers
3






active

oldest

votes

















up vote
2
down vote













Define $b_n=a_n-1.5$. Therefore$$b_n+b_{n+1}=0$$which means that$$b_{n+1}=b_1(-1)^n$$or $$a_n=1.5+k(-1)^n$$with $a_1=1$ we have $$a_1=1=1.5+k(-1)to k= 0.5$$therefore $$a_n={3+(-1)^nover 2}$$






share|cite|improve this answer





















  • Mostafa Ayaz.Nice+
    – Peter Szilas
    Nov 24 at 9:54










  • That's very kind of you.....
    – Mostafa Ayaz
    Nov 24 at 9:58


















up vote
1
down vote













Another way is to use characteristic polynomial method (here is another example). Given
$$a_n+a_{n+1}=3$$
$$a_{n-1}+a_n=3$$
we have $a_{n+1}-a_{n-1}=0$, with characteristic polynomial
$$x^2-1=0$$
with solutions $-1,1$ and general term
$$a_n=Acdot (-1)^n+Bcdot 1^n=Acdot (-1)^n+B tag{1}$$
From
$$a_0=5=A+B$$
$$a_1=-2=-A+B$$
we have $B=frac{3}{2}$ and $A=frac{7}{2}$ or
$$a_n=frac{7}{2}cdot (-1)^n+frac{3}{2} tag{2}$$






share|cite|improve this answer




























    up vote
    0
    down vote














    Let an be a sequence such that $a_0=5$ and $a_n+a_{n+1}=3$ for all $n$ greater than $0$.




    First note: $a_0+a_1=3 Rightarrow 5+a_1=3 Rightarrow a_1=-2$.



    It looks you are trying to use the generating function $f(x)=sum_{n=0}^{infty} a_nx^n$. Here are the steps:
    $$sum_{n=0}^{infty} a_nx^{n+1}+sum_{n=0}^{infty} a_{n+1}x^{n+1}=3sum_{n=0}^{infty} x^{n} Rightarrow \
    xf(x)+f(x)-a_0=3cdot frac1{1-x} Rightarrow \
    f(x)=frac{5-2x}{(1-x)(1+x)}=frac7{2(1+x)}+frac3{2(1-x)}=\
    frac72sum_{n=0}^{infty}(-x)^n+frac32sum_{n=0}^{infty} x^n =\
    sum_{n=0}^{infty}left[frac72(-1)^n+frac32right]x^n Rightarrow \
    a_n=frac72(-1)^n+frac32.$$



    Can you solve the recurrence relation $a_n+a_{n+1}=3$, if $a_0=2, a_1=1$?






    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',
      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%2f3011336%2ffinding-a-formula-for-a-sequence%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      Define $b_n=a_n-1.5$. Therefore$$b_n+b_{n+1}=0$$which means that$$b_{n+1}=b_1(-1)^n$$or $$a_n=1.5+k(-1)^n$$with $a_1=1$ we have $$a_1=1=1.5+k(-1)to k= 0.5$$therefore $$a_n={3+(-1)^nover 2}$$






      share|cite|improve this answer





















      • Mostafa Ayaz.Nice+
        – Peter Szilas
        Nov 24 at 9:54










      • That's very kind of you.....
        – Mostafa Ayaz
        Nov 24 at 9:58















      up vote
      2
      down vote













      Define $b_n=a_n-1.5$. Therefore$$b_n+b_{n+1}=0$$which means that$$b_{n+1}=b_1(-1)^n$$or $$a_n=1.5+k(-1)^n$$with $a_1=1$ we have $$a_1=1=1.5+k(-1)to k= 0.5$$therefore $$a_n={3+(-1)^nover 2}$$






      share|cite|improve this answer





















      • Mostafa Ayaz.Nice+
        – Peter Szilas
        Nov 24 at 9:54










      • That's very kind of you.....
        – Mostafa Ayaz
        Nov 24 at 9:58













      up vote
      2
      down vote










      up vote
      2
      down vote









      Define $b_n=a_n-1.5$. Therefore$$b_n+b_{n+1}=0$$which means that$$b_{n+1}=b_1(-1)^n$$or $$a_n=1.5+k(-1)^n$$with $a_1=1$ we have $$a_1=1=1.5+k(-1)to k= 0.5$$therefore $$a_n={3+(-1)^nover 2}$$






      share|cite|improve this answer












      Define $b_n=a_n-1.5$. Therefore$$b_n+b_{n+1}=0$$which means that$$b_{n+1}=b_1(-1)^n$$or $$a_n=1.5+k(-1)^n$$with $a_1=1$ we have $$a_1=1=1.5+k(-1)to k= 0.5$$therefore $$a_n={3+(-1)^nover 2}$$







      share|cite|improve this answer












      share|cite|improve this answer



      share|cite|improve this answer










      answered Nov 24 at 8:59









      Mostafa Ayaz

      13.3k3836




      13.3k3836












      • Mostafa Ayaz.Nice+
        – Peter Szilas
        Nov 24 at 9:54










      • That's very kind of you.....
        – Mostafa Ayaz
        Nov 24 at 9:58


















      • Mostafa Ayaz.Nice+
        – Peter Szilas
        Nov 24 at 9:54










      • That's very kind of you.....
        – Mostafa Ayaz
        Nov 24 at 9:58
















      Mostafa Ayaz.Nice+
      – Peter Szilas
      Nov 24 at 9:54




      Mostafa Ayaz.Nice+
      – Peter Szilas
      Nov 24 at 9:54












      That's very kind of you.....
      – Mostafa Ayaz
      Nov 24 at 9:58




      That's very kind of you.....
      – Mostafa Ayaz
      Nov 24 at 9:58










      up vote
      1
      down vote













      Another way is to use characteristic polynomial method (here is another example). Given
      $$a_n+a_{n+1}=3$$
      $$a_{n-1}+a_n=3$$
      we have $a_{n+1}-a_{n-1}=0$, with characteristic polynomial
      $$x^2-1=0$$
      with solutions $-1,1$ and general term
      $$a_n=Acdot (-1)^n+Bcdot 1^n=Acdot (-1)^n+B tag{1}$$
      From
      $$a_0=5=A+B$$
      $$a_1=-2=-A+B$$
      we have $B=frac{3}{2}$ and $A=frac{7}{2}$ or
      $$a_n=frac{7}{2}cdot (-1)^n+frac{3}{2} tag{2}$$






      share|cite|improve this answer

























        up vote
        1
        down vote













        Another way is to use characteristic polynomial method (here is another example). Given
        $$a_n+a_{n+1}=3$$
        $$a_{n-1}+a_n=3$$
        we have $a_{n+1}-a_{n-1}=0$, with characteristic polynomial
        $$x^2-1=0$$
        with solutions $-1,1$ and general term
        $$a_n=Acdot (-1)^n+Bcdot 1^n=Acdot (-1)^n+B tag{1}$$
        From
        $$a_0=5=A+B$$
        $$a_1=-2=-A+B$$
        we have $B=frac{3}{2}$ and $A=frac{7}{2}$ or
        $$a_n=frac{7}{2}cdot (-1)^n+frac{3}{2} tag{2}$$






        share|cite|improve this answer























          up vote
          1
          down vote










          up vote
          1
          down vote









          Another way is to use characteristic polynomial method (here is another example). Given
          $$a_n+a_{n+1}=3$$
          $$a_{n-1}+a_n=3$$
          we have $a_{n+1}-a_{n-1}=0$, with characteristic polynomial
          $$x^2-1=0$$
          with solutions $-1,1$ and general term
          $$a_n=Acdot (-1)^n+Bcdot 1^n=Acdot (-1)^n+B tag{1}$$
          From
          $$a_0=5=A+B$$
          $$a_1=-2=-A+B$$
          we have $B=frac{3}{2}$ and $A=frac{7}{2}$ or
          $$a_n=frac{7}{2}cdot (-1)^n+frac{3}{2} tag{2}$$






          share|cite|improve this answer












          Another way is to use characteristic polynomial method (here is another example). Given
          $$a_n+a_{n+1}=3$$
          $$a_{n-1}+a_n=3$$
          we have $a_{n+1}-a_{n-1}=0$, with characteristic polynomial
          $$x^2-1=0$$
          with solutions $-1,1$ and general term
          $$a_n=Acdot (-1)^n+Bcdot 1^n=Acdot (-1)^n+B tag{1}$$
          From
          $$a_0=5=A+B$$
          $$a_1=-2=-A+B$$
          we have $B=frac{3}{2}$ and $A=frac{7}{2}$ or
          $$a_n=frac{7}{2}cdot (-1)^n+frac{3}{2} tag{2}$$







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Nov 24 at 23:01









          rtybase

          10.2k21433




          10.2k21433






















              up vote
              0
              down vote














              Let an be a sequence such that $a_0=5$ and $a_n+a_{n+1}=3$ for all $n$ greater than $0$.




              First note: $a_0+a_1=3 Rightarrow 5+a_1=3 Rightarrow a_1=-2$.



              It looks you are trying to use the generating function $f(x)=sum_{n=0}^{infty} a_nx^n$. Here are the steps:
              $$sum_{n=0}^{infty} a_nx^{n+1}+sum_{n=0}^{infty} a_{n+1}x^{n+1}=3sum_{n=0}^{infty} x^{n} Rightarrow \
              xf(x)+f(x)-a_0=3cdot frac1{1-x} Rightarrow \
              f(x)=frac{5-2x}{(1-x)(1+x)}=frac7{2(1+x)}+frac3{2(1-x)}=\
              frac72sum_{n=0}^{infty}(-x)^n+frac32sum_{n=0}^{infty} x^n =\
              sum_{n=0}^{infty}left[frac72(-1)^n+frac32right]x^n Rightarrow \
              a_n=frac72(-1)^n+frac32.$$



              Can you solve the recurrence relation $a_n+a_{n+1}=3$, if $a_0=2, a_1=1$?






              share|cite|improve this answer

























                up vote
                0
                down vote














                Let an be a sequence such that $a_0=5$ and $a_n+a_{n+1}=3$ for all $n$ greater than $0$.




                First note: $a_0+a_1=3 Rightarrow 5+a_1=3 Rightarrow a_1=-2$.



                It looks you are trying to use the generating function $f(x)=sum_{n=0}^{infty} a_nx^n$. Here are the steps:
                $$sum_{n=0}^{infty} a_nx^{n+1}+sum_{n=0}^{infty} a_{n+1}x^{n+1}=3sum_{n=0}^{infty} x^{n} Rightarrow \
                xf(x)+f(x)-a_0=3cdot frac1{1-x} Rightarrow \
                f(x)=frac{5-2x}{(1-x)(1+x)}=frac7{2(1+x)}+frac3{2(1-x)}=\
                frac72sum_{n=0}^{infty}(-x)^n+frac32sum_{n=0}^{infty} x^n =\
                sum_{n=0}^{infty}left[frac72(-1)^n+frac32right]x^n Rightarrow \
                a_n=frac72(-1)^n+frac32.$$



                Can you solve the recurrence relation $a_n+a_{n+1}=3$, if $a_0=2, a_1=1$?






                share|cite|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote










                  Let an be a sequence such that $a_0=5$ and $a_n+a_{n+1}=3$ for all $n$ greater than $0$.




                  First note: $a_0+a_1=3 Rightarrow 5+a_1=3 Rightarrow a_1=-2$.



                  It looks you are trying to use the generating function $f(x)=sum_{n=0}^{infty} a_nx^n$. Here are the steps:
                  $$sum_{n=0}^{infty} a_nx^{n+1}+sum_{n=0}^{infty} a_{n+1}x^{n+1}=3sum_{n=0}^{infty} x^{n} Rightarrow \
                  xf(x)+f(x)-a_0=3cdot frac1{1-x} Rightarrow \
                  f(x)=frac{5-2x}{(1-x)(1+x)}=frac7{2(1+x)}+frac3{2(1-x)}=\
                  frac72sum_{n=0}^{infty}(-x)^n+frac32sum_{n=0}^{infty} x^n =\
                  sum_{n=0}^{infty}left[frac72(-1)^n+frac32right]x^n Rightarrow \
                  a_n=frac72(-1)^n+frac32.$$



                  Can you solve the recurrence relation $a_n+a_{n+1}=3$, if $a_0=2, a_1=1$?






                  share|cite|improve this answer













                  Let an be a sequence such that $a_0=5$ and $a_n+a_{n+1}=3$ for all $n$ greater than $0$.




                  First note: $a_0+a_1=3 Rightarrow 5+a_1=3 Rightarrow a_1=-2$.



                  It looks you are trying to use the generating function $f(x)=sum_{n=0}^{infty} a_nx^n$. Here are the steps:
                  $$sum_{n=0}^{infty} a_nx^{n+1}+sum_{n=0}^{infty} a_{n+1}x^{n+1}=3sum_{n=0}^{infty} x^{n} Rightarrow \
                  xf(x)+f(x)-a_0=3cdot frac1{1-x} Rightarrow \
                  f(x)=frac{5-2x}{(1-x)(1+x)}=frac7{2(1+x)}+frac3{2(1-x)}=\
                  frac72sum_{n=0}^{infty}(-x)^n+frac32sum_{n=0}^{infty} x^n =\
                  sum_{n=0}^{infty}left[frac72(-1)^n+frac32right]x^n Rightarrow \
                  a_n=frac72(-1)^n+frac32.$$



                  Can you solve the recurrence relation $a_n+a_{n+1}=3$, if $a_0=2, a_1=1$?







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Nov 24 at 18:17









                  farruhota

                  18.3k2736




                  18.3k2736






























                      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%2f3011336%2ffinding-a-formula-for-a-sequence%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

                      Tonle Sap (See)

                      I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

                      Guatemaltekische Davis-Cup-Mannschaft