Let \(X_1,X_2,\ldots \) be i.i.d. with common distribution \(\mathbb {P}(X_1=1)=\mathbb {P}(X_1=-1)=1/2\), and put \(S_0:=0\) and \(S_n:=X_1+\cdots +X_n\) for each \(n\geq 1\). Consider the stopping time \(N:=\min \{n\geq 1:S_n=1\}\).
(a) Let \(g(u):=\mathbb {E}[u^{X_1}]\) for all \(u>1\), and show that the optional stopping theorem applies to the martingale \(M_n:=u^{S_n}g(u)^{-n}\), where \(u>1\), and the stopping time \(N\).
(b) Use part (a) to show that \[ \mathbb {E}[v^N]=\frac {1-\sqrt {1-v^2}}{v}, \qquad 0<v<1. \]
(c) Use part (b) to show that \[ \mathbb {P}(N=2m+1)= \frac {1}{m+1}\binom {2m}{m}\frac {1}{2^{2m+1}}, \qquad m\geq 0. \]