Solution 5.1.2.1.

Notice that the sequence of differences is constant. We know how to find the generating function for any constant sequence. So denote the generating function for \(1, 3, 5, 7, 9, \ldots\) by \(A\text{.}\) We have

\begin{align*} A \amp = 1 + 3x + 5x^2 + 7x^3 + 9x^4 + \cdots\\ \underline{-\qquad xA} \amp \underline{\,\,= 0 + x + 3x^2 + 5x^3 + 7x^4 + 9x^5 + \cdots}\\ (1-x)A \amp = 1 + 2x + 2x^2 + 2x^3 + 2x^4 + \cdots \end{align*}

We know that \(2x + 2x^2 + 2x^3 + 2x^4 + \cdots = \dfrac{2x}{1-x}\text{.}\) Thus

\begin{equation*} (1-x)A = 1 + \frac{2x}{1-x}\text{.} \end{equation*}

Now solve for \(A\text{:}\)

\begin{equation*} A = \frac{1}{1-x} + \frac{2x}{(1-x)^2} = \frac{1+x}{(1-x)^2}\text{.} \end{equation*}

Does this makes sense? Before we simplified the two fractions into one, we were adding the generating function for the sequence \(1,1,1,1,\ldots\) to the generating function for the sequence \(0, 2, 4, 6, 8, 10, \ldots\) (remember \(\frac{1}{(1-x)^2}\) generates \(1,2,3,4,5, \ldots\text{,}\) multiplying by \(2x\) shifts it over, putting the zero out front, and doubles each term). If we add these term by term, we get the correct sequence \(1,3,5,7, 9, \ldots\text{.}\)

in-context