Reflected nearest-neighbour random walk (source code)

= Reflected nearest-neighbour random walk

On $\mathbb N$, let the chain jump from every $i\geq1$ to $i+1$ with probability $p$ and to $i-1$ with probability $1-p$, and jump from zero to one. It is recurrent exactly when $p\leq1/2$; at $p=1/2$ it is null recurrent.