Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which one of the following is the closed form for the generating function of the sequence \(\{a_{n}\}_{n \ge 0}\) defined below?

\[ a_{n} = \begin{cases} n + 1, & n \text{ is odd} \\ 1, & \text{otherwise} \end{cases} \]

  • A.\(\frac{x(1 + x^{2})}{(1 - x^{2})^{2}} + \frac{1}{1 - x}\)
  • B.\(\frac{x(3 - x^{2})}{(1 - x^{2})^{2}} + \frac{1}{1 - x}\)
  • C.\(\frac{2x}{(1 - x^{2})^{2}} + \frac{1}{1 - x}\)
  • D.\(\frac{x}{(1 - x^{2})^{2}} + \frac{1}{1 - x}\)

Answer: A

The closed form is \(\frac{x(1 + x^{2})}{(1 - x^{2})^{2}} + \frac{1}{1 - x}\).

Write \(a_{n} = 1 + b_{n}\), where \(b_{n} = n\) for odd \(n\) and 0 otherwise. The constant part gives \(\sum x^{n} = \frac{1}{1-x}\). For the odd part, start from \(g(x) = \sum n x^{n} = \frac{x}{(1-x)^{2}}\) and keep only the odd powers with \(\frac{g(x) - g(-x)}{2}\):

\[ \begin{aligned} \sum_{n \text{ odd}} n x^{n} &= \frac{1}{2}\left[\frac{x}{(1-x)^{2}} + \frac{x}{(1+x)^{2}}\right] \\ &= \frac{x\left[(1+x)^{2} + (1-x)^{2}\right]}{2(1-x^{2})^{2}} \\ &= \frac{x(1 + x^{2})}{(1 - x^{2})^{2}} \end{aligned} \]

Check the first terms: the sequence is 1, 2, 1, 4, 1, 6, ..., and \(\frac{x(1+x^{2})}{(1-x^{2})^{2}} = x + 3x^{3} + 5x^{5} + \cdots\), which added to \(1 + x + x^{2} + \cdots\) gives exactly that. The other numerators fail on these terms: \(x(3 - x^{2})\) and \(2x\) give 3 and 2 as the coefficient of \(x\) instead of 1, and \(x\) gives 2 as the coefficient of \(x^{3}\) instead of 3.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.