In the infinite sequence

a, b, (a + b)/2, (a + 3b)/4, . . .

each term after the second is the arithmetic mean of the two previous terms.

Find the limit of the sequence in terms of real numbers a and b.

After a and b, the sequence can be written as T1=(1a+1b)/2^1, T2=(1a+3b)/2^2, T3=(3a+5b)/2^3 , T4=(5a+8b)/2^4, T5=(11a+21b)/2^5....

Using recurrences, and leaving the 2^n denominator aside, it's easy to show that the "a" coefficient in Tn is (2^n-(-1)^n)/3, and the "b" coefficient in Tn is (2^(n+1)+(-1)^n)/3.

In the limit, you get

(a+2b)/3.