A biased coin is tossed until a head appears for the first time. Let $p$ denote the probability of a head, $0 < p < 1$. What is the probability that the number of tosses required is odd?
My attempt:
Let $p = $ probability of a head on any given toss and $X = $ number of tosses required to get a head. Then for any toss $x$ \begin{align*} P(X = x) = (1-p)^{x-1}p. \end{align*} We want to know $P(X = 2n + 1) = (1-p)^{2n}p$. Therefore our cumulative distribution function looks like \begin{align*} P(X \leq 2n+1) = \sum_{i = 1}^{2n+1} P(X = i) & = \sum_{i=1}^{2n+1} (1-p)^{2i} p \\ & = \frac{(1-p)^{4n+4} - (p-1)^2}{p-2}. \end{align*} I am stuck what do do from here, and how to exclude possibilities where $X$ is even.