How to check if Generating Function is correct? I have the following sequence given recursively by:
$$A_n - 2A_{n-1} - 4A_{n-2} = 0$$
Where:
$$A_0 = 1, A_1 = 3, A_2 = 10, A_3 = 32, etc.$$
To find the generating function, I have done the following:
$$\begin{aligned} A &= 1 + 3x + 10x^2 + 32x^3 + \dots 
\\ -2xA &= 0 - 2x - 6x^2 - 20x^3 + \dots 
\\ -4x^2 A &= 0 - 0 - 4x^2 - 12x^3 + \dots \end{aligned}$$
[NOTE: The $0s$ are there for formatting purposes, they're not part of the expressions]
Adding these together:
$$(1 - 2x - 4x^2)A = 1 + x + 0$$
$$A = \frac{1+x}{1 - 2x - 4x^2}$$
Which, I'm guessing, gives me the generating function.
My question is, how do I know if this is correct? What is this generating function supposed to tell me?
If I substitute certain values into the generating function, will I get the initial sequence given recursively or will I get the function, $A = 1 + 3x + 10x^2 + 32x^3 + ...$?

You can do polynomial long division to grind out as many terms as you like. (Sorry for the image, trying to figure out how to do this with MathJax made me grow faint.)

