Solution (source code)

= Solution
{c}

First the <expected value> of the <absorption time> is finite. From any interior state, consecutive leftward moves lead to absorption within at most $n$ steps, with <probability> at least $p=3^{-n}$. By <independence> of the subsequent steps, the <probability> of surviving $jn$ steps is at most $(1-p)^j$. Summing this <geometric series> bounds the <expected value> of the <absorption time> by $n/p$.

Now apply <first-step analysis>. Starting from $k$ in the interior, one step is always used. Conditional on that step, the remaining <expected values> are $e_{k+1}$, $e_k$, and $e_{k-1}$, each with <probability> $1/3$. The <law of total expectation> therefore gives
$$
e_k=1+\frac13e_{k+1}+\frac13e_k+\frac13e_{k-1}.
$$
The term $1$ remains even when the particle stays at $k$, because a step has elapsed. Rearranging gives
$$
\boxed{\frac13e_{k+1}-\frac23e_k+\frac13e_{k-1}=-1,\qquad 1\leq k\leq n-1.}
$$