Results 1 to 4 of 4

Thread: Some quick math help

  1. #1
    Join Date
    Oct 2011
    Location
    Chicago
    Posts
    3,352
    Mentioned
    21 Post(s)
    Quoted
    437 Post(s)

    Default Some quick math help

    So I have
    an = (2^n)-1 for n>=1
    and I want to know is this recursive formula equivalent to it
    an = 2*(an_-1) +1


    When I commuted it they don't appear to be equal but the solutions manual says otherwise.
    This is their solution: if an = (2^n) -1, then (an_-1) = (2^(n-1) -1, so 2*(an_-1) + 1 = 2(2^(n-1) - 1) + 1 = (2^n) -1

    Explanation would be pleasant.
    Last edited by [XoL]; 09-24-2013 at 03:30 PM.




    Anti-Leech Movement Prevent Leeching Spread the word
    Insanity 60 Days (Killer workout)
    XoL Blog (Workouts/RS/Misc)

  2. #2
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by [XoL] View Post
    So I have
    an = (2^n)-1 for n>=1
    and I want to know is this recursive formula equivalent to it
    an = 2*(an_-1) +1
    Is the following true?
    2^n-1=an?=2(an_-1)+1
    2^n-1=an?=2(an_)-1
    2^n=an?=2an_

    I'm assuming 'an' is a single variable that is not the same as 'an_'. = is a guaranteed equals and ?= is a 'does it equal, if yes then your answer is yes'. Are my assumptions true?

  3. #3
    Join Date
    Oct 2011
    Location
    Chicago
    Posts
    3,352
    Mentioned
    21 Post(s)
    Quoted
    437 Post(s)

    Default

    Sorry was a bit unclear, an is the same variable as an_-1 (for the most part), the _ is subscript so I can right a recursive function (an_-1, meaning use the last answer)




    Anti-Leech Movement Prevent Leeching Spread the word
    Insanity 60 Days (Killer workout)
    XoL Blog (Workouts/RS/Misc)

  4. #4
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Rewritten with subscript to read easier now

    anx = (2^n)-1 for n>=1 (GIVEN)
    2*anx-1 + 1 = anx (DETERMINE)

    anx-1 = (2^(n-1))-1
    (multiply 2 by both sides)
    2*anx-1 = 2*(2^(n-1))-2
    (simplify)
    2*anx-1 = 2^n-2
    (add 1 to both sides)
    2*anx-1+1 = 2^n-1
    (substitute)
    2*anx-1+1 = anx

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •