I am trying to understand this answer, but it doesn't work when I plug in the numbers. Given the recurrence relation
\begin{align*} E_n &= \dfrac{\displaystyle 1+\sum_{k=1}^{n-1}q^kp^{n-k}E_{k}}{1-q^n} \\ E_1 &= \frac{1}{p} \end{align*}
and assuming $p = q = 1/2$, we can compute $E_5$ as:
\begin{align} E_1 &= 2\\ E_2 &= \frac{1 + (1/2)(1/2)2}{1-(1/4)} = \frac{6}{3} = 2\\ E_3 &= \frac{1 + (1/2)(1/4)2 + (1/4)(1/2)2}{1-(1/8)} = \frac{12}{7} \approx 1.714\\ E_4 &= \frac{1 + (1/2)(1/8)2 + (1/4)(1/4)2 + (1/8)(1/2)(12/7)}{1-(1/16)} = \frac{152}{105} \approx 1.448\\ E_5 &= \frac{1 + (1/2)(1/16)2 + (1/4)(1/8)2 + (1/8)(1/4)(12/7) + (1/16)(1/2)(152/105)}{1-(1/32)} = \frac{4112}{3255} \approx 1.263, \end{align}
which does not match the author's answer of $E_5 = 2470/651 \approx 3.79416282642$.
I have no experience with absorbing Markov chains so I have no idea where the mistake is. Am I doing something wrong or is the answer wrong?
(Apologies if this is not the right place. I would have posted this as a comment to the answer, but my reputation is not high enough to do that...)
The recurrence relation given by @saulspatz in the comments is correct. Solved for $E_n$, it is:
$$ E_n = \dfrac{1+\sum\limits_{k=1}^{n-1}\binom{n}{k}p^{n-k}q^{k}E_k}{1 - q^n} $$
with $ E_1 = \frac{1}{p} $. This form correctly predicts $ E_2 = \frac{8}{3} $ and $ E_3 = \frac{22}{7} $, as well as $ E_5 = \frac{2470}{651}$.