Here is a formula for the balance at the beginning of year n
balance = ((1 + i)^n (3 + i) pmt + (1 + i) (-2^Floor[(1 + n)/2] -
2^Floor[n/2] (1 + i)) pmt)/(-1 + i + 3 i^2 + i^3)
The Floor function is available in Excel. This is an Excel implementation.

A version without use of Floor is
balance = ((1 + i)^n (3 + i) pmt + 2^(1/4 (-1)^n (-1 + (-1)^n (-1 + 2 n))) (1 + i)
(-2^(1/2 (-1)^(2 n)) - 2^((-1)^n/2) (1 + i)) pmt)/(-1 + i + 3 i^2 + i^3)
Formula derivation
Here is the derivation. With interest i
at 10% and initial pmt
.
i = 0.1
pmt = 100
The balance at the beginning of year 1 is 0. At the end of year 1 a payment is made so the balance at the beginning of year 2 is pmt
. The next payment (the second) is double, etc.
p1 = 0
p2 = p1 (1 + i) + pmt
p3 = p2 (1 + i) + 2*pmt
p4 = p3 (1 + i) + 2*pmt
p5 = p4 (1 + i) + 2^2*pmt
p6 = p5 (1 + i) + 2^2*pmt
p7 = p6 (1 + i) + 2^3*pmt
p8 = p7 (1 + i) + 2^3*pmt
p9 = p8 (1 + i) + 2^4*pmt = 5437.33
p10 = p9 (1 + i) + 2^4*pmt = 7581.06
Another way of expressing p10
is
p[9 + 1] = p[9](1 + i) + 2^Floor[9/2]*pmt
So this can be solved using Mathematica
RSolve[{p[n + 1] == p[n] (1 + i) + 2^Floor[n/2]*pmt, p[1] == 0}, p[n], n]

The formula correctly calculates the balance at the beginning of the specified year.
p[n] = ((1 + i)^n (3 + i) pmt + (1 + i) (-2^Floor[(1 + n)/2] -
2^Floor[n/2] (1 + i)) pmt)/(-1 + i + 3 i^2 + i^3)
p[9] = 5437.33
p[10] = 7581.06
The floor functions can be replaced
Floor[(1 + n)/2] = 1/4 (-1)^n (-1 + (-1)^n + 2 (-1)^n n)
and Floor[n/2] = 1/4 (-1)^n (1 + (-1)^(1 + n) + 2 (-1)^n n)
giving
p[n] = ((1 + i)^n (3 + i) pmt + 2^(1/4 (-1)^n (-1 + (-1)^n (-1 + 2 n))) (1 + i)
(-2^(1/2 (-1)^(2 n)) - 2^((-1)^n/2) (1 + i)) pmt)/(-1 + i + 3 i^2 + i^3)
For example, the balance at the beginning of year 9
i = 0.1
pmt = 100
n = 9
balance = ((1 + i)^n (3 + i) pmt + 2^(1/4 (-1)^n (-1 + (-1)^n (-1 + 2 n))) (1 + i)
(-2^(1/2 (-1)^(2 n)) - 2^((-1)^n/2) (1 + i)) pmt)/(-1 + i + 3 i^2 + i^3)
= 5437.33
Alternative method
The same solution can also be found as the closed form of a summation.

The summation for the example would look like this
i = 0.1
pmt = 100
n = 9
balance = 2^0 pmt (1 + i)^(n - 1 - 1) +
2^1 pmt (1 + i)^(n - 2 - 1) + 2^1 pmt (1 + i)^(n - 3 - 1) +
2^2 pmt (1 + i)^(n - 4 - 1) + 2^2 pmt (1 + i)^(n - 5 - 1) +
2^3 pmt (1 + i)^(n - 6 - 1) + 2^3 pmt (1 + i)^(n - 7 - 1) +
2^4 pmt (1 + i)^(n - 8 - 1)
= 5437.33
Basic future value calculation
The above contrasts with the basic calculation without any doubling like so.
i = 0.1
pmt = 100
n = 9
Iterative calculation
p1 = 0
p2 = p1 (1 + i) + pmt
p3 = p2 (1 + i) + pmt
p4 = p3 (1 + i) + pmt
p5 = p4 (1 + i) + pmt
p6 = p5 (1 + i) + pmt
p7 = p6 (1 + i) + pmt
p8 = p7 (1 + i) + pmt
p9 = p8 (1 + i) + pmt = 1143.59
Summation calculation
balance = pmt (1 + i)^0 +
pmt (1 + i)^1 + pmt (1 + i)^2 +
pmt (1 + i)^3 + pmt (1 + i)^4 +
pmt (1 + i)^5 + pmt (1 + i)^6 +
pmt (1 + i)^7
= 1143.59
Formula derivation

balance = ((-1 + (1 + i)^(-1 + n)) pmt)/i = 1143.59