Shreve I-5: Recurrence and biased random walks

Here we give a proof that random walk is recurrent for $p=1/2$ and not for other values of $p$.

From Shreve’s older book “Stochastic calculus and financial applications” p. 6 we have:
Let $p$ be the probability of a step to the right, $X_i=+1$, and $q=1-p$.
Let $f(k)$ be the probability of reaching $A$ before $-B$ given that $S_0=k$. Then
$$
f(k)=pf(k+1)+qf(k-1)
$$
In terms of $\Delta f(k):=f(k+1)-f(k)$ this says
$$
\Delta f(k)=(q/p)\Delta f(k-1)
$$
so
$$
\Delta f(k+j)=(q/p)^{j}\Delta f(k)
$$
and so
$$
f(k)=f(-B)+ \sum_{i=-B}^{k-1} \Delta f(i)
= 0 + \sum_{i=-B}^{k-1} \Delta f(i) =
\sum_{j=0}^{k+B-1}\Delta f(j-B)
$$
$$
= \Delta f(-B) \sum_{j=0}^{k+B-1}(q/p)^j
$$
$$
= f(-B+1) \sum_{j=0}^{k+B-1}(q/p)^j
$$
$$
= f(-B+1) \frac{(q/p)^{k+B}-1}{(q/p)-1}
$$
Since $f(A)=1$ we can evaluate $f(-B+1)$ as $\frac{(q/p)-1}{(q/p)^{A+B}-1}$.
Then
$$
f(0)= \frac{(q/p)-1}{(q/p)^{A+B}-1} \frac{(q/p)^{B}-1}{(q/p)-1}$$
Thus

$$
P(S_n \text{ hits }A\text{ before }-B \mid S_0=0) = \frac{(q/p)^B-1}{(q/p)^{A+B}-1}
$$
Setting $A=B$ we have
$$
P(S_n \text{ hits }A\text{ before }-A \mid S_0=0) = \frac{(q/p)^A-1}{(q/p)^{2A}-1} = \frac{1}{(q/p)^{A}+1}
$$
Let us consider the probability of never hitting $-A$. This is the same as hitting $A$ before $-A$, then $3A$ before $-A$ (so in effect $2A$ before $-2A$), then $7A$ before $-A$ (so in effect $4A$ before $-4A$), and so on, so we get
$$
\prod_{k=1,2,4,\ldots}\frac{1}{(q/p)^{kA}+1}
=
\prod_{n=0}^\infty\frac{1}{(q/p)^{A2^n}+1}
$$
Let us set $A=2^a$ where $a\ge 0$, $a$ an integer (where $a=0$ is perhaps most interesting), so we are looking at
$$
\prod_{n=0}^\infty\frac{1}{(q/p)^{2^{n+a}}+1}
$$
If $p\le 1/2$ then $q/p\ge 1$ and so this is
$$
\le \prod_{n=0}^\infty\frac{1}{1^{2^{n+a}}+1}=0
$$
since the factors are bounded below 1. But if $p>1/2$ then $\alpha:=q/p<1$ and we have the equivalent conditions
$$
\prod_{n=0}^\infty\frac{1}{\alpha^{2^{n+a}}+1} > 0
$$
$$
\log\prod_{n=0}^\infty\frac{1}{\alpha^{2^n}+1} > -\infty
$$
$$
\sum\log\frac{1}{\alpha^{2^n}+1} > -\infty
$$
$$
\sum\log({\alpha^{2^n}+1}) < \infty
$$
But $\ln(x)\le x-1$ for all $x>0$, so
$$
\sum\log({\alpha^{2^n}+1}) < \sum \alpha^{2^n} < \sum\alpha^n < \infty
$$
Moreover as $a\rightarrow\infty$ the nonzero product actually approaches 1. Thus the probability that each negative number will eventually be reached is zero when $p>1/2$. Similarly, if $p<1/2$ then the probability that each positive number will eventually be reached is zero.