We have the following state-space $S = \{0,1,2,3\} $ with transition matrix:$$ P = \begin{pmatrix}\frac{1}{2} & \frac{1}{2} & 0 & 0 \\ \frac{1}{2}&\frac{1}{2}&0&0 \\ 0 &0 &\frac{1}{3} & \frac{2}{3} \\ 0 &0&0&1 \end{pmatrix}$$
Deduce a general form for $P^n$ in terms of $n$ and use this to calculate $P(X_{20} = 2|X_{10}=2)$.
After plugging in the matrix into R to easily calculate a large number of matrix multiplications to see the trend. I find that all values remain the same besides $X_{3, 3} X_{3, 4}$. We find that as multiplcations increase, then $X_{3,4}$converges closer to one, and $X_{3,3}$ towards zero.
I can find this easily with a programming software but I cannot do the mathematical calculations to derive this. How do I find the general form for $P^n$?
As for the second part:
[,1] [,2] [,3] [,4]
[1,] 0.5 0.5 0.000000e+00 0
[2,] 0.5 0.5 0.000000e+00 0
[3,] 0.0 0.0 2.867972e-10 1
[4,] 0.0 0.0 0.000000e+00 1
Is the matrix at the twentieth time-step, and because of floating point arithmetic the software can only compute small numbers, but its largely safe to say it's zero at $P(X_{20}=2|X_{10}=2)$