We have $5$ floors and we are on the ground(treat the ground as floor$0$).
The probability of jumping from the ground to floor$1$ is $1$.
For $i\in\{1,2,3,4\}$, the probability of jumping from the $i$-th floor to the $i+1$-th floor is $\frac{1}{3^i}$, the probability of staying at the $i$-th floor is $\frac{3^i-1}{2\times 3^i}$, the probability of jumping from the $i$-th floor to the $i-1$-th floor is $\frac{3^i-1}{2\times 3^i}$,
What is the expectation of the number of turns that you jump from the ground and reach floor$5$?
My thought:
I first came up with the probability matrix $P = \begin{pmatrix} 0& \frac{1}{3}& 0& 0& 0& 0\\ 1& \frac{1}{3}& \frac{4}{9}& 0& 0& 0\\ 0& \frac{1}{3}& \frac{4}{9}& \frac{13}{27}& 0& 0\\ 0& 0& \frac{1}{9}& \frac{13}{27}& \frac{40}{81}& 0\\ 0& 0& 0& \frac{1}{27}& \frac{40}{81}& 0\\ 0& 0& 0& 0& \frac{1}{81}& 0 \end{pmatrix}$
and the initial state is $e_1 = \begin{pmatrix} 1\\ 0\\ 0\\ 0\\ 0\\ 0 \end{pmatrix}$
so the expectation should be $$\sum_{x=0}^\infty x[(P^xe_1)\cdot e_6]$$ where $\cdot$ is the inner product and $e_6 = \begin{pmatrix} 0\\ 0\\ 0\\ 0\\ 0\\ 1 \end{pmatrix}$
Is my thought correct so far? And I can't go through it further. I used programming and got an approximation of the series that the expectation should be $14543$