You are viewing a single comment's thread. Return to all comments →
This might help a bit :)
ONLY the first itteration uses the value of a.
Therefore, The first output value is: (a + 2 ^ 0 + b)
for the next itteration you just add the value of (2 ^ 1 * b) on the previous itteration value. then you just keep adding up to (2 ^ i * b), I is only up to the n value.