A frog jumps on an infinite ladder. He goes up one step with probability $(1-p)$, and falls back down to the ground with probability $p$. If the frog has just fallen to the bottom, on average how many jumps will it take before he next reaches step $i$?
I showed that the frog's jumps form a Markov chain, with transition probability $p_{i,i+1}=(1-p)$ from step $i$ to step $i+1$, and probability $p_{i,0}=p$ from step $i$ to the ground. It then follows that the stationary distribution $(\pi_0,\pi_1,\dots)$ is geometric, with $\pi_i=(1-p)^{i}p$. Let $k_{i}^{j}$ denotes the mean time to go from step $i$ to step $j$ and $m_i = k_{i}^{i}$ is the mean return time from step $i$ to itself. Then, using the law of total expectation, we have \begin{align*}&m_i=(1-p)\left(1+k_{i+1}^{i}\right)+p\left(1+k_{0}^{i}\right), \text{ and} \\ &k_{i+1}^{i} = (1-p)\left(1+k_{i+2}^{i}\right)+p\left(1+k_{0}^{i}\right)\end{align*} Solving the latter recurrence relation, we get \begin{equation*}k_{j}^{i} = \frac{1}{p}\left(1+pk_{0}^{i}-\left(\frac{1}{1-p}\right)^j\right)\end{equation*} We also have the well-known result $m_i = \frac{1}{\pi_i}$, so substituting all of this into the first equation gives \begin{equation*}\frac{1}{(1-p)^{i}p} = (1-p)\left(1+\frac{1}{p}\left(1+pk_{0}^{i}-\left(\frac{1}{1-p}\right)^{i+1}\right)\right)+p\left(1+k_{0}^{i}\right)\end{equation*} so we can solve for the desired $k_{0}^{i}$ as \begin{equation*}k_{0}^{i} = \frac{2}{(1-p)^{i}p}-\frac{1}{p}\end{equation*} However, the answer is apparently supposed to be \begin{equation*}\frac{1}{(1-p)^{i}p}-\frac{1}{p}\end{equation*} the explanation being that $m_i = k_{i}^{0}+k_{0}^{i}$, with $m_i = \frac{1}{(1-p)^{i}p}$ as above and $k_{i}^{0} = \frac{1}{p}$ by a property of the geometric distribution. So I can't figure out what I did wrong to get the $2$ in the numerator - any assistance would be much appreciated. Thanks in advance for reading this long post.