Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is this acceptable in recursive formulas?

  1. Jan 19, 2012 #1
    Say for the recursive formula 2, 5, 9, 19 , 37...


    Instead of writing it as an = an-1 + * 2 an-2

    can you write it as:

    an = 2an + (-1)n


    Just double checking. I encountered this earlier helping someone and I haven't done recursive formulas in a while..
     
    Last edited: Jan 19, 2012
  2. jcsd
  3. Jan 19, 2012 #2

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    I think you meant an = 2an-1 + (-1)n

    Sure. Your formula is the same as

    an = an-1 + (-1)n + an-1
    = an-1 + (-1)n + 2an-2 + (-1)n-1
    = an-1 + 2an-2
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Is this acceptable in recursive formulas?
  1. Non-recursive formula (Replies: 3)

  2. Simple recursion (Replies: 3)

Loading...