Recursion Question using Generating FunctionsRecurrence relations and generating functions questionTextbook questions on generating functionsQuestion about generating functions with trigRecurrence relation to closed form of generating functionDerive a closed formula for the generating function of this recurrence relationSolving a recurrence relation using generating functionsUse generating functions to solve $a_n = 6a_n-1 - 8a_n-2 + 3 $ and…Solving the recurrence $a_n+2 = 3a_n+1 - 2a_n, a_0 = 1, a_1 = 3$ using generating functionsSolving $a_n+1 = c_n a_n$ using generating functionsHow to find the generating function of one recurrence relation in terms of that of another

Do I have a twin with permutated remainders?

RSA: Danger of using p to create q

What would happen to a modern skyscraper if it rains micro blackholes?

Unable to deploy metadata from Partner Developer scratch org because of extra fields

Is it possible to run Internet Explorer on OS X El Capitan?

Perform and show arithmetic with LuaLaTeX

Client team has low performances and low technical skills: we always fix their work and now they stop collaborate with us. How to solve?

How do I deal with an unproductive colleague in a small company?

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

What does it mean to describe someone as a butt steak?

What are these boxed doors outside store fronts in New York?

Why can't I see bouncing of switch on oscilloscope screen?

Could an aircraft fly or hover using only jets of compressed air?

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Why is 150k or 200k jobs considered good when there's 300k+ births a month?

Does detail obscure or enhance action?

Can a vampire attack twice with their claws using Multiattack?

How to determine what difficulty is right for the game?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

Important Resources for Dark Age Civilizations?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Which country benefited the most from UN Security Council vetoes?

Revoked SSL certificate

I'm flying to France today and my passport expires in less than 2 months



Recursion Question using Generating Functions


Recurrence relations and generating functions questionTextbook questions on generating functionsQuestion about generating functions with trigRecurrence relation to closed form of generating functionDerive a closed formula for the generating function of this recurrence relationSolving a recurrence relation using generating functionsUse generating functions to solve $a_n = 6a_n-1 - 8a_n-2 + 3 $ and…Solving the recurrence $a_n+2 = 3a_n+1 - 2a_n, a_0 = 1, a_1 = 3$ using generating functionsSolving $a_n+1 = c_n a_n$ using generating functionsHow to find the generating function of one recurrence relation in terms of that of another













1












$begingroup$


Here is my question:



Consider the recurrence,
$$a_n+1=2a_n+(-1)^n$$
with initial condition,
$$a_0=0$$



Find and prove a formula for $a_n$.



I don't really know how to prove this formula



I tried going with a generating function method, but that kind of led nowhere.










share|cite|improve this question











$endgroup$











  • $begingroup$
    Have you learnt about how to solve recurrences like $a_n+1=2a_n+(-1)^n$?
    $endgroup$
    – Minus One-Twelfth
    Mar 21 at 0:30











  • $begingroup$
    I got something like 1 / (1-2x)(1+x) but that seems nowhere near what I want
    $endgroup$
    – Michael Mao
    Mar 21 at 0:31






  • 2




    $begingroup$
    Please do not use image for the critical part of the question. Click on the tiny edit and use MathJax to properly typeset math expressions.
    $endgroup$
    – Lee David Chung Lin
    Mar 21 at 1:02










  • $begingroup$
    I've copied the significant parts of the question into MathJax, and added a full answer below. Hope that helps !
    $endgroup$
    – Martin Hansen
    Mar 21 at 18:16















1












$begingroup$


Here is my question:



Consider the recurrence,
$$a_n+1=2a_n+(-1)^n$$
with initial condition,
$$a_0=0$$



Find and prove a formula for $a_n$.



I don't really know how to prove this formula



I tried going with a generating function method, but that kind of led nowhere.










share|cite|improve this question











$endgroup$











  • $begingroup$
    Have you learnt about how to solve recurrences like $a_n+1=2a_n+(-1)^n$?
    $endgroup$
    – Minus One-Twelfth
    Mar 21 at 0:30











  • $begingroup$
    I got something like 1 / (1-2x)(1+x) but that seems nowhere near what I want
    $endgroup$
    – Michael Mao
    Mar 21 at 0:31






  • 2




    $begingroup$
    Please do not use image for the critical part of the question. Click on the tiny edit and use MathJax to properly typeset math expressions.
    $endgroup$
    – Lee David Chung Lin
    Mar 21 at 1:02










  • $begingroup$
    I've copied the significant parts of the question into MathJax, and added a full answer below. Hope that helps !
    $endgroup$
    – Martin Hansen
    Mar 21 at 18:16













1












1








1





$begingroup$


Here is my question:



Consider the recurrence,
$$a_n+1=2a_n+(-1)^n$$
with initial condition,
$$a_0=0$$



Find and prove a formula for $a_n$.



I don't really know how to prove this formula



I tried going with a generating function method, but that kind of led nowhere.










share|cite|improve this question











$endgroup$




Here is my question:



Consider the recurrence,
$$a_n+1=2a_n+(-1)^n$$
with initial condition,
$$a_0=0$$



Find and prove a formula for $a_n$.



I don't really know how to prove this formula



I tried going with a generating function method, but that kind of led nowhere.







sequences-and-series discrete-mathematics recurrence-relations generating-functions






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 21 at 18:11









Martin Hansen

780114




780114










asked Mar 21 at 0:28









Michael MaoMichael Mao

161




161











  • $begingroup$
    Have you learnt about how to solve recurrences like $a_n+1=2a_n+(-1)^n$?
    $endgroup$
    – Minus One-Twelfth
    Mar 21 at 0:30











  • $begingroup$
    I got something like 1 / (1-2x)(1+x) but that seems nowhere near what I want
    $endgroup$
    – Michael Mao
    Mar 21 at 0:31






  • 2




    $begingroup$
    Please do not use image for the critical part of the question. Click on the tiny edit and use MathJax to properly typeset math expressions.
    $endgroup$
    – Lee David Chung Lin
    Mar 21 at 1:02










  • $begingroup$
    I've copied the significant parts of the question into MathJax, and added a full answer below. Hope that helps !
    $endgroup$
    – Martin Hansen
    Mar 21 at 18:16
















  • $begingroup$
    Have you learnt about how to solve recurrences like $a_n+1=2a_n+(-1)^n$?
    $endgroup$
    – Minus One-Twelfth
    Mar 21 at 0:30











  • $begingroup$
    I got something like 1 / (1-2x)(1+x) but that seems nowhere near what I want
    $endgroup$
    – Michael Mao
    Mar 21 at 0:31






  • 2




    $begingroup$
    Please do not use image for the critical part of the question. Click on the tiny edit and use MathJax to properly typeset math expressions.
    $endgroup$
    – Lee David Chung Lin
    Mar 21 at 1:02










  • $begingroup$
    I've copied the significant parts of the question into MathJax, and added a full answer below. Hope that helps !
    $endgroup$
    – Martin Hansen
    Mar 21 at 18:16















$begingroup$
Have you learnt about how to solve recurrences like $a_n+1=2a_n+(-1)^n$?
$endgroup$
– Minus One-Twelfth
Mar 21 at 0:30





$begingroup$
Have you learnt about how to solve recurrences like $a_n+1=2a_n+(-1)^n$?
$endgroup$
– Minus One-Twelfth
Mar 21 at 0:30













$begingroup$
I got something like 1 / (1-2x)(1+x) but that seems nowhere near what I want
$endgroup$
– Michael Mao
Mar 21 at 0:31




$begingroup$
I got something like 1 / (1-2x)(1+x) but that seems nowhere near what I want
$endgroup$
– Michael Mao
Mar 21 at 0:31




2




2




$begingroup$
Please do not use image for the critical part of the question. Click on the tiny edit and use MathJax to properly typeset math expressions.
$endgroup$
– Lee David Chung Lin
Mar 21 at 1:02




$begingroup$
Please do not use image for the critical part of the question. Click on the tiny edit and use MathJax to properly typeset math expressions.
$endgroup$
– Lee David Chung Lin
Mar 21 at 1:02












$begingroup$
I've copied the significant parts of the question into MathJax, and added a full answer below. Hope that helps !
$endgroup$
– Martin Hansen
Mar 21 at 18:16




$begingroup$
I've copied the significant parts of the question into MathJax, and added a full answer below. Hope that helps !
$endgroup$
– Martin Hansen
Mar 21 at 18:16










2 Answers
2






active

oldest

votes


















0












$begingroup$

The sequence generated by the recurrence relation is;
$$0, 1, 1, 3, 5, 11, 21, dots$$
Write the recurrence relation as;
$$a_n-2a_n-1=(-1)(-1)^n$$
Get the generating function, $GF$ in the standard way;
$$GF=0+x+x^2+3x^3+5x^4+11x^5+21x^6+dots$$
$$-2xGF=0+0x-2x^2-2x^3-6x^4-10x^5-22x^6+dots$$
$$(1-2x)GF=0+x-x^2+x^3-x^4+x^5-x^6+x^7-x^8+ dots$$
$$(1-2x)GF=-big(frac11+xbig)+1$$
$$GF=fracx(1-2x)(1+x)$$
Use partial fractions to get;
$$GF=frac13times frac11-2x-frac13times frac11+x$$
These are standard bits that translate directly into the formula;
$$a_n=frac132^n-frac13(-1)^n$$
or
$$a_n=frac2^n-(-1)^n3$$
Check this gives the sequence expected, which it does!






share|cite|improve this answer









$endgroup$




















    0












    $begingroup$

    Hint.



    Calling



    $$
    G(x) = sum_k=0^inftya_k x^k
    $$



    we have



    $$
    a_k+1x^k-2a_k x^k -(-1)^k x^k = 0
    $$



    or



    $$
    frac 1xsum_k=1^inftya_k x^k - 2sum_k=0^inftya_k x^k-sum_k=0^infty(-1)^k x^k = 0
    $$



    now assuming $|x| < 1$ we have



    $$
    frac 1x (G(x)-a_0)-2G(x)-frac1x+1=0
    $$



    and



    $$
    G(x) = fraca_01-2x+frac 13frac11-2x-frac 13frac11+x
    $$



    etc.






    share|cite|improve this answer









    $endgroup$













      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%2f3156168%2frecursion-question-using-generating-functions%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









      0












      $begingroup$

      The sequence generated by the recurrence relation is;
      $$0, 1, 1, 3, 5, 11, 21, dots$$
      Write the recurrence relation as;
      $$a_n-2a_n-1=(-1)(-1)^n$$
      Get the generating function, $GF$ in the standard way;
      $$GF=0+x+x^2+3x^3+5x^4+11x^5+21x^6+dots$$
      $$-2xGF=0+0x-2x^2-2x^3-6x^4-10x^5-22x^6+dots$$
      $$(1-2x)GF=0+x-x^2+x^3-x^4+x^5-x^6+x^7-x^8+ dots$$
      $$(1-2x)GF=-big(frac11+xbig)+1$$
      $$GF=fracx(1-2x)(1+x)$$
      Use partial fractions to get;
      $$GF=frac13times frac11-2x-frac13times frac11+x$$
      These are standard bits that translate directly into the formula;
      $$a_n=frac132^n-frac13(-1)^n$$
      or
      $$a_n=frac2^n-(-1)^n3$$
      Check this gives the sequence expected, which it does!






      share|cite|improve this answer









      $endgroup$

















        0












        $begingroup$

        The sequence generated by the recurrence relation is;
        $$0, 1, 1, 3, 5, 11, 21, dots$$
        Write the recurrence relation as;
        $$a_n-2a_n-1=(-1)(-1)^n$$
        Get the generating function, $GF$ in the standard way;
        $$GF=0+x+x^2+3x^3+5x^4+11x^5+21x^6+dots$$
        $$-2xGF=0+0x-2x^2-2x^3-6x^4-10x^5-22x^6+dots$$
        $$(1-2x)GF=0+x-x^2+x^3-x^4+x^5-x^6+x^7-x^8+ dots$$
        $$(1-2x)GF=-big(frac11+xbig)+1$$
        $$GF=fracx(1-2x)(1+x)$$
        Use partial fractions to get;
        $$GF=frac13times frac11-2x-frac13times frac11+x$$
        These are standard bits that translate directly into the formula;
        $$a_n=frac132^n-frac13(-1)^n$$
        or
        $$a_n=frac2^n-(-1)^n3$$
        Check this gives the sequence expected, which it does!






        share|cite|improve this answer









        $endgroup$















          0












          0








          0





          $begingroup$

          The sequence generated by the recurrence relation is;
          $$0, 1, 1, 3, 5, 11, 21, dots$$
          Write the recurrence relation as;
          $$a_n-2a_n-1=(-1)(-1)^n$$
          Get the generating function, $GF$ in the standard way;
          $$GF=0+x+x^2+3x^3+5x^4+11x^5+21x^6+dots$$
          $$-2xGF=0+0x-2x^2-2x^3-6x^4-10x^5-22x^6+dots$$
          $$(1-2x)GF=0+x-x^2+x^3-x^4+x^5-x^6+x^7-x^8+ dots$$
          $$(1-2x)GF=-big(frac11+xbig)+1$$
          $$GF=fracx(1-2x)(1+x)$$
          Use partial fractions to get;
          $$GF=frac13times frac11-2x-frac13times frac11+x$$
          These are standard bits that translate directly into the formula;
          $$a_n=frac132^n-frac13(-1)^n$$
          or
          $$a_n=frac2^n-(-1)^n3$$
          Check this gives the sequence expected, which it does!






          share|cite|improve this answer









          $endgroup$



          The sequence generated by the recurrence relation is;
          $$0, 1, 1, 3, 5, 11, 21, dots$$
          Write the recurrence relation as;
          $$a_n-2a_n-1=(-1)(-1)^n$$
          Get the generating function, $GF$ in the standard way;
          $$GF=0+x+x^2+3x^3+5x^4+11x^5+21x^6+dots$$
          $$-2xGF=0+0x-2x^2-2x^3-6x^4-10x^5-22x^6+dots$$
          $$(1-2x)GF=0+x-x^2+x^3-x^4+x^5-x^6+x^7-x^8+ dots$$
          $$(1-2x)GF=-big(frac11+xbig)+1$$
          $$GF=fracx(1-2x)(1+x)$$
          Use partial fractions to get;
          $$GF=frac13times frac11-2x-frac13times frac11+x$$
          These are standard bits that translate directly into the formula;
          $$a_n=frac132^n-frac13(-1)^n$$
          or
          $$a_n=frac2^n-(-1)^n3$$
          Check this gives the sequence expected, which it does!







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Mar 21 at 17:28









          Martin HansenMartin Hansen

          780114




          780114





















              0












              $begingroup$

              Hint.



              Calling



              $$
              G(x) = sum_k=0^inftya_k x^k
              $$



              we have



              $$
              a_k+1x^k-2a_k x^k -(-1)^k x^k = 0
              $$



              or



              $$
              frac 1xsum_k=1^inftya_k x^k - 2sum_k=0^inftya_k x^k-sum_k=0^infty(-1)^k x^k = 0
              $$



              now assuming $|x| < 1$ we have



              $$
              frac 1x (G(x)-a_0)-2G(x)-frac1x+1=0
              $$



              and



              $$
              G(x) = fraca_01-2x+frac 13frac11-2x-frac 13frac11+x
              $$



              etc.






              share|cite|improve this answer









              $endgroup$

















                0












                $begingroup$

                Hint.



                Calling



                $$
                G(x) = sum_k=0^inftya_k x^k
                $$



                we have



                $$
                a_k+1x^k-2a_k x^k -(-1)^k x^k = 0
                $$



                or



                $$
                frac 1xsum_k=1^inftya_k x^k - 2sum_k=0^inftya_k x^k-sum_k=0^infty(-1)^k x^k = 0
                $$



                now assuming $|x| < 1$ we have



                $$
                frac 1x (G(x)-a_0)-2G(x)-frac1x+1=0
                $$



                and



                $$
                G(x) = fraca_01-2x+frac 13frac11-2x-frac 13frac11+x
                $$



                etc.






                share|cite|improve this answer









                $endgroup$















                  0












                  0








                  0





                  $begingroup$

                  Hint.



                  Calling



                  $$
                  G(x) = sum_k=0^inftya_k x^k
                  $$



                  we have



                  $$
                  a_k+1x^k-2a_k x^k -(-1)^k x^k = 0
                  $$



                  or



                  $$
                  frac 1xsum_k=1^inftya_k x^k - 2sum_k=0^inftya_k x^k-sum_k=0^infty(-1)^k x^k = 0
                  $$



                  now assuming $|x| < 1$ we have



                  $$
                  frac 1x (G(x)-a_0)-2G(x)-frac1x+1=0
                  $$



                  and



                  $$
                  G(x) = fraca_01-2x+frac 13frac11-2x-frac 13frac11+x
                  $$



                  etc.






                  share|cite|improve this answer









                  $endgroup$



                  Hint.



                  Calling



                  $$
                  G(x) = sum_k=0^inftya_k x^k
                  $$



                  we have



                  $$
                  a_k+1x^k-2a_k x^k -(-1)^k x^k = 0
                  $$



                  or



                  $$
                  frac 1xsum_k=1^inftya_k x^k - 2sum_k=0^inftya_k x^k-sum_k=0^infty(-1)^k x^k = 0
                  $$



                  now assuming $|x| < 1$ we have



                  $$
                  frac 1x (G(x)-a_0)-2G(x)-frac1x+1=0
                  $$



                  and



                  $$
                  G(x) = fraca_01-2x+frac 13frac11-2x-frac 13frac11+x
                  $$



                  etc.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Mar 21 at 22:48









                  CesareoCesareo

                  9,7263517




                  9,7263517



























                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3156168%2frecursion-question-using-generating-functions%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

                      Solar Wings Breeze Design and development Specifications (Breeze) References Navigation menu1368-485X"Hang glider: Breeze (Solar Wings)"e

                      Kathakali Contents Etymology and nomenclature History Repertoire Songs and musical instruments Traditional plays Styles: Sampradayam Training centers and awards Relationship to other dance forms See also Notes References External links Navigation menueThe Illustrated Encyclopedia of Hinduism: A-MSouth Asian Folklore: An EncyclopediaRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to Play10.1353/atj.2005.0004The Illustrated Encyclopedia of Hinduism: A-MEncyclopedia of HinduismKathakali Dance-drama: Where Gods and Demons Come to PlaySonic Liturgy: Ritual and Music in Hindu Tradition"The Mirror of Gesture"Kathakali Dance-drama: Where Gods and Demons Come to Play"Kathakali"Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceMedieval Indian Literature: An AnthologyThe Oxford Companion to Indian TheatreSouth Asian Folklore: An Encyclopedia : Afghanistan, Bangladesh, India, Nepal, Pakistan, Sri LankaThe Rise of Performance Studies: Rethinking Richard Schechner's Broad SpectrumIndian Theatre: Traditions of PerformanceModern Asian Theatre and Performance 1900-2000Critical Theory and PerformanceBetween Theater and AnthropologyKathakali603847011Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceBetween Theater and AnthropologyBetween Theater and AnthropologyNambeesan Smaraka AwardsArchivedThe Cambridge Guide to TheatreRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeThe Garland Encyclopedia of World Music: South Asia : the Indian subcontinentThe Ethos of Noh: Actors and Their Art10.2307/1145740By Means of Performance: Intercultural Studies of Theatre and Ritual10.1017/s204912550000100xReconceiving the Renaissance: A Critical ReaderPerformance TheoryListening to Theatre: The Aural Dimension of Beijing Opera10.2307/1146013Kathakali: The Art of the Non-WorldlyOn KathakaliKathakali, the dance theatreThe Kathakali Complex: Performance & StructureKathakali Dance-Drama: Where Gods and Demons Come to Play10.1093/obo/9780195399318-0071Drama and Ritual of Early Hinduism"In the Shadow of Hollywood Orientalism: Authentic East Indian Dancing"10.1080/08949460490274013Sanskrit Play Production in Ancient IndiaIndian Music: History and StructureBharata, the Nāṭyaśāstra233639306Table of Contents2238067286469807Dance In Indian Painting10.2307/32047833204783Kathakali Dance-Theatre: A Visual Narrative of Sacred Indian MimeIndian Classical Dance: The Renaissance and BeyondKathakali: an indigenous art-form of Keralaeee

                      Urgehal History Discography Band members References External links Navigation menu"Mediateket: Urgehal""Interview with Enzifer of Urgehal, 2007""Urgehal - Interview"Urgehal"Urgehal Frontman Trondr Nefas Dies at 35"Urgehal9042691cb161873230(data)0000 0001 0669 4224no2016126817ee6ccef6-e558-44b6-b059-dbbb5b913b24145036459145036459