There is a non-negative random walk {0,1,2,3,...}. I got a matrix like this: \begin{bmatrix} \frac23 & \frac13 & 0 & 0 & ... \\ p_i,_{i-1} & p_i,_i & p_i,_{i+1} & 0 & 0 & ... \\ 0 & p_i,_{i-1} & p_i,_i & p_i,_{i+1} & 0 & ... \\ 0 & 0 & p_i,_{i-1} & p_i,_i & p_i,_{i+1} & 0 & ... \\ 0 & 0 & 0 & p_i,_{i-1} & p_i,_i & p_i,_{i+1} & 0 & ... \\ \ddots & \ddots & \ddots & \ddots & \ddots & \ddots \end{bmatrix}
How to calculate the stationary distribution of it knowing that it's positive recurrent?
Let $p_{i,i+1}=p_i$, $p_{i,i}=r_i$, $p_{i,i-1}=q_i$ to simplify the notation slightly. (Then $p_0 = \frac13$). Note that of course $p_i+r_i+q_i=1$ for this to be an (infinite) stochastic matrix. We want to find an invariant measure $\nu$ such that $\nu P=\nu$. Set $\nu(0) = 1$ and for any $k>0$, $$\nu(k) = \prod_{i=1}^k \frac{p_{i-1}}{q_i}. $$ Note that $$ \nu(0) = \nu(0)r_0 + \nu(1)q_1 = r_0+p_0 = 1 = \nu(0), $$ and for $k>0$, \begin{align} \nu(k) &= \nu(k-1)p_{k-1} + \nu(k)r_k + \nu(k+1)q_{k+1}\\ &= \nu(k)\left(\frac{q_k}{p_{k-1}}p_{k-1} + r_k + \frac{p_k}{q_{k+1}}q_{k+1} \right)\\ &=\nu(k). \end{align} Now let $C=\sum_{k=0}^\infty \nu(k)$. Then $\pi = \frac1C\nu$ satisfies $\pi P=\pi$ and $\sum_{k=0}^\infty \pi(k)=1$, so that $\pi$ is a stationary distribution for $P$. Note that $C$ is finite precisely because the Markov chain is positive recurrent.