[proofplan]
We prove both directions of the equivalence between $\sum_{n=0}^{\infty} p_{ii}(n) = \infty$ and recurrence. Setting $j = i$ in the [Generating Function Identity](/theorems/2212) and solving for $P_{ii}(s)$ yields $P_{ii}(s) = 1/(1 - F_{ii}(s))$ for $0 < s < 1$. Abel's lemma (the theorem being proved) then connects the limit $s \to 1^-$ of $P_{ii}(s)$ to the series $\sum_n p_{ii}(n)$, and the limit of $F_{ii}(s)$ to $\mathbb{P}_i(T_i < \infty)$, giving a clean criterion: the series diverges iff $\mathbb{P}_i(T_i < \infty) = 1$.
[/proofplan]
[step:Specialise the Generating Function Identity to $i = j$ and solve for $P_{ii}(s)$]
Setting $i = j$ in the [Generating Function Identity](/theorems/2212) gives
\begin{align*}
P_{ii}(s) = 1 + F_{ii}(s)\, P_{ii}(s)
\end{align*}
for all $0 < s < 1$. We claim $F_{ii}(s) < 1$ for $0 < s < 1$, so that we may divide. Indeed, $F_{ii}(s) = \sum_{m=1}^{\infty} f_{ii}(m)\, s^m$. Since $f_{ii}(m) \geq 0$ for all $m$ and $0 < s < 1$, each term satisfies $f_{ii}(m)\, s^m \leq f_{ii}(m)$, with strict inequality whenever $f_{ii}(m) > 0$ (because $s^m < 1$). At least one $f_{ii}(m)$ is positive (since $p_{ii}(0) = 1 > 0$ ensures the chain can be at $i$, and either the chain returns with positive probability giving some $f_{ii}(m) > 0$, or $F_{ii}(1) = 0 < 1$ and the bound is immediate). Therefore
\begin{align*}
F_{ii}(s) = \sum_{m=1}^{\infty} f_{ii}(m)\, s^m < \sum_{m=1}^{\infty} f_{ii}(m) = F_{ii}(1) \leq 1.
\end{align*}
Since $1 - F_{ii}(s) > 0$, we solve:
\begin{align*}
P_{ii}(s) = \frac{1}{1 - F_{ii}(s)}.
\end{align*}
[guided]
We want a closed-form expression for $P_{ii}(s)$ in terms of $F_{ii}(s)$. The [Generating Function Identity](/theorems/2212) with $i = j$ gives $P_{ii}(s) = 1 + F_{ii}(s)\, P_{ii}(s)$, since $\delta_{ii} = 1$. This is a linear equation in $P_{ii}(s)$: rearranging, $(1 - F_{ii}(s))\, P_{ii}(s) = 1$.
Can we divide by $1 - F_{ii}(s)$? We need $F_{ii}(s) \neqeq 1$, and in fact we will show $F_{ii}(s) < 1$ strictly for $0 < s < 1$.
The generating function $F_{ii}(s) = \sum_{m=1}^{\infty} f_{ii}(m)\, s^m$ is a power series with non-negative coefficients. For $0 < s < 1$, each nonzero term $f_{ii}(m)\, s^m$ is strictly less than $f_{ii}(m)$ because $s^m < 1$. There are two cases. If $F_{ii}(1) = \sum_m f_{ii}(m) = 0$, then $F_{ii}(s) = 0 < 1$. If $F_{ii}(1) > 0$, then at least one $f_{ii}(m) > 0$, and that term contributes $f_{ii}(m)\, s^m < f_{ii}(m)$, so $F_{ii}(s) < F_{ii}(1) \leq 1$. In either case, $F_{ii}(s) < 1$.
Therefore $1 - F_{ii}(s) > 0$ and we obtain
\begin{align*}
P_{ii}(s) = \frac{1}{1 - F_{ii}(s)}.
\end{align*}
This is the key algebraic identity: the generating function of return probabilities is the reciprocal of $1 - F_{ii}(s)$.
[/guided]
[/step]
[step:Take $s \to 1^-$ using Abel's lemma to relate the generating functions to their coefficient sums]
Both $P_{ii}(s) = \sum_{n=0}^{\infty} p_{ii}(n)\, s^n$ and $F_{ii}(s) = \sum_{m=1}^{\infty} f_{ii}(m)\, s^m$ are power series with non-negative coefficients. By the monotone convergence theorem for series (applied term by term: as $s \nearrow 1$, each term $p_{ii}(n)\, s^n \nearrow p_{ii}(n)$), we have
\begin{align*}
\lim_{s \to 1^-} P_{ii}(s) = \sum_{n=0}^{\infty} p_{ii}(n),
\end{align*}
where the limit is $+\infty$ if the series diverges. Similarly,
\begin{align*}
\lim_{s \to 1^-} F_{ii}(s) = \sum_{m=1}^{\infty} f_{ii}(m) = F_{ii}(1) = \mathbb{P}_i(T_i < \infty).
\end{align*}
This is Abel's lemma applied to power series with non-negative coefficients: the limit of the generating function as $s \to 1^-$ equals the sum of the series (finite or infinite).
[guided]
Why can we pass the limit inside the sum? For a power series $\sum_n a_n s^n$ with $a_n \geq 0$, as $s$ increases from $0$ toward $1$, each partial sum $\sum_{n=0}^{N} a_n s^n$ is a monotonically increasing function of $s$. For any fixed $s < 1$, the infinite series converges (it is bounded by the radius of convergence, which is at least $1$ since $p_{ii}(n) \leq 1$). The monotone convergence theorem for non-negative series (viewing the sum as an integral with respect to counting measure) gives
\begin{align*}
\lim_{s \to 1^-} \sum_{n=0}^{\infty} p_{ii}(n)\, s^n = \sum_{n=0}^{\infty} \lim_{s \to 1^-} p_{ii}(n)\, s^n = \sum_{n=0}^{\infty} p_{ii}(n).
\end{align*}
The same reasoning applies to $F_{ii}(s)$ since $f_{ii}(m) \geq 0$:
\begin{align*}
\lim_{s \to 1^-} F_{ii}(s) = \sum_{m=1}^{\infty} f_{ii}(m) = \mathbb{P}_i(T_i < \infty),
\end{align*}
where the last equality is the definition of $F_{ii}(1)$: the total probability of ever returning to $i$.
[/guided]
[/step]
[step:Combine to obtain the recurrence criterion]
Substituting the limits into $P_{ii}(s) = 1/(1 - F_{ii}(s))$:
\begin{align*}
\sum_{n=0}^{\infty} p_{ii}(n) = \lim_{s \to 1^-} P_{ii}(s) = \frac{1}{1 - \lim_{s \to 1^-} F_{ii}(s)} = \frac{1}{1 - \mathbb{P}_i(T_i < \infty)}.
\end{align*}
The continuity of $s \mapsto 1/(1 - s)$ on $[0, 1)$ justifies passing the limit through the reciprocal. We now read off the two cases:
**Recurrent case.** If $i$ is recurrent, then $\mathbb{P}_i(T_i < \infty) = 1$, so $1 - \mathbb{P}_i(T_i < \infty) = 0$ and the right-hand side is $+\infty$. Therefore $\sum_{n=0}^{\infty} p_{ii}(n) = \infty$.
**Transient case.** If $i$ is transient, then $\mathbb{P}_i(T_i < \infty) < 1$, so $1 - \mathbb{P}_i(T_i < \infty) > 0$ and the right-hand side is finite. Therefore $\sum_{n=0}^{\infty} p_{ii}(n) = 1/(1 - \mathbb{P}_i(T_i < \infty)) < \infty$.
This establishes the equivalence: $i$ is recurrent iff $\sum_{n=0}^{\infty} p_{ii}(n) = \infty$.
[guided]
We now combine the algebraic identity from the first step with the Abel's lemma limits from the second step. The identity $P_{ii}(s) = 1/(1 - F_{ii}(s))$ holds for all $0 < s < 1$. As $s \to 1^-$:
- The left side $P_{ii}(s) \to \sum_{n=0}^{\infty} p_{ii}(n)$ (possibly $+\infty$).
- The denominator $1 - F_{ii}(s) \to 1 - \mathbb{P}_i(T_i < \infty)$.
Since $F_{ii}(s) < 1$ for all $s < 1$ and $F_{ii}(s) \nearrow F_{ii}(1) = \mathbb{P}_i(T_i < \infty) \leq 1$, the function $s \mapsto 1/(1 - F_{ii}(s))$ is continuous and monotonically increasing on $(0, 1)$. Its limit as $s \to 1^-$ is $1/(1 - \mathbb{P}_i(T_i < \infty))$ when $\mathbb{P}_i(T_i < \infty) < 1$, and $+\infty$ when $\mathbb{P}_i(T_i < \infty) = 1$.
Therefore:
\begin{align*}
\sum_{n=0}^{\infty} p_{ii}(n) = \frac{1}{1 - \mathbb{P}_i(T_i < \infty)}.
\end{align*}
The right-hand side is $+\infty$ precisely when $\mathbb{P}_i(T_i < \infty) = 1$, which is the definition of recurrence. When $\mathbb{P}_i(T_i < \infty) < 1$ (transience), the right-hand side is a finite positive number. This completes the proof that $i$ is recurrent iff $\sum_n p_{ii}(n) = \infty$.
[/guided]
[/step]