Expected Value of a Coin Flipping Game with Variable Coins

Not quite a closed form but here is a simplification.

Let $X$ be a random variable denoting the number of rounds that the game lasts. First we use the fact that $$\mathbb{E}[X] = \sum_{n=0}^{\infty} \mathbb{P}(X > n) = 1 + \sum_{n=1}^{\infty} \mathbb{P}(X > n).$$

$X>n$ if and only if rounds $1,2,\ldots, n$ are won. The probability we win round $n$ is $1/2$ if $n$ is odd and $\frac{1}{2} \left( 1 - \frac{ \binom{n}{n/2} }{2^n} \right)$ if $n$ is even. Therefore we have

$$ \mathbb{E}[X] = 1 + \sum_{n=1}^{\infty} \frac{1}{2^n} \prod_{m=2,4,6,\ldots}^n \left(1 - \frac{ \binom{m}{m/2} }{2^m} \right)$$

Using the first $150$ terms of this series gives the value to $50$ correct decimal places:

$$\mathbb{E}[X] \approx 1.7229609314217239880589009988703907210042264264132$$


Here is the Python code I used to generate the value. It runs in about 0.6 milliseconds on my machine.

from scipy.special import comb
from decimal import *
getcontext().prec = 50 # Number of decimal places

def p(i): # Probability of winning round i
    if i % 2: return Decimal('0.5')
    return Decimal('0.5') - Decimal(comb(i, i//2)) / Decimal(2**(i+1))

def EV(n):
    S, P = 1, 1
    for i in range(1, n+1):
        P *= p(i)
        S += P
    return S

print(EV(150))