Jump to content

FORUMsubscriber

[04] MEMBER II
  • Posts

    123
  • Joined

  • Last visited

Posts posted by FORUMsubscriber

  1. Is this the one from the calculator?

     

    If T represents the amount you bigin with, and Xn represents the amount remaining at a certain floor, we get:

     

    X0 = T

    X1 = T/2 + 1

    X2 = (T/2 + 1)/2 + 1 = T/4 + 1/2 + 1

    X3 = (T/4 + 1/2 + 1)/2 + 1 = T/8 + 1/4 + 1/2 + 1

    X4 = (T/8 + 1/4 + 1/2 + 1)/2 + 1 = T/16 + 1/8 + 1/4 + 1/2 + 1

    .

    .

    .

    Xn = T/(2^n) + 1/(2^(n-1)) + 1/(2^(n-2)) + 1/(2^(n-3)) + ... + 1/(2^(n-n))

     

    = T/(2^n) + 1/(2^(n-1)) + 1/(2^(n-2)) + 1/(2^(n-3)) ... + 1

     

    = (T + 2 + 4 + 8 + ... + 2^(n-1) + 2^n) / (2^n)

     

    Now, if R represents the remainder after the nth iteration (floor), we can get T as:

     

    (T + 2 + 4 + 8 + ... + 2^(n-1) + 2^n) / (2^n) = R

     

    (T + 2 + 4 + 8 + ... + 2^(n-1) + 2^n) = R*2^n

     

    T = R*2^n - 2 - 4 - 8 - ... - 2^(n-1) - 2^n

    So suppose R = 2 after n = 20:

     

    T = 2*2^n - 2 - 4 - 8 - ... - 2^(20-1) - 2^20

     

    = 2^21 - 2 - 4 - 8 - ... - 2^19 - 2^20

     

    = 2

     

    Funny thing about this formula: as n approaches infinity, no matter how much you start with, Xn also approaches 2

×
×
  • Create New...