# Why are generating functions useful?

I was under the mistaken impression that if one could find the generating function for a sequence of numbers, you could just plug in a natural number $n$ to find the nth term of the sequence. I realize now that I was confusing this with a closed form formula.

So if that is not the case, then what is the point of generating functions? How do they make understanding counting sequences easier? For example, suppose I had a problem where I wanted to count how many ways I could buy $n$ pieces of apples, oranges, and pears given that I want an even number of apples, an odd number of oranges, and at most 3 pears. This would be the number of nonnegative integer solutions to $a+b+c=n$ with $a$ even, $b$ odd, and $0\leq c\leq 3$. This is the same as the coefficient of $x^n$ in the product

But what good is that? I don’t see how this is much better. Also, with use of exponential generating functions, it seems the choice of monomials we use as place holders for the terms of the sequence can be arbitrary. Then then $n$th term of the sequence is just the coefficient of the $n$th monomial that you’ve chosen to build the generating function with. What is the real advantage of doing things like this? Many problems I see tend to ask me find the generating function, but then I’m rarely asked to do anything with it.