I'm looking at $\mathbb N_0$ as a directed graph:
for every vertex $n$ there are 2 edges:
one goes to $n+1$ with probability $0<p_n<1$ and one goes to $n-1$ with probability $1-p_n$
[from 0 there is only one edge going to 1 with prob 1]
Let's say I have a function $h:\mathbb N_0\rightarrow \mathbb R$ which is harmonic on $\mathbb N$ [without 0]. I have proven it exists and unique.
[discrete harmonic on weighted graph: $h(j)= \sum_{n\in S} P(n,j)h(j)$ where $S$ is the set of vertices that has an edge directed to $j$
Now I'm asked to prove that the graph is recurrent iff $lim_{n\rightarrow \infty}h(n)=\infty$.
I have no clue how to do it. I think it's related to martingales and doob's optional stopping time theorem, but I have no clue.