Find generating function of series $a_{n} = 2^{n} + 3^{n} $
I'm having a problem with this because at first i have to find recursive equation for $a_{n}$ . I find that $a_{0} = 2$ , $a_{1} = 5$ but how do I find the rest? Also I can't simply add generating functions, I have to solve recursive equation using generating functions. First step is to find recursive equation for $a_{n}$ then some other stuff that I can handle.
$$a_n=2^n+3^n,\\ a_{n+1}=2\cdot2^n+3\cdot3^n,\\ a_{n+2}=4\cdot2^n+9\cdot3^n$$
Then we eliminate $2^n$ and $3^n$ from the above relations by
$$a_{n+2}-4a_n=5\cdot3^n,\\ a_{n+1}-2a_n=3^n$$
and
$$a_{n+2}-4a_n=5(a_{n+1}-2a_n)$$
or
$$a_{n+2}=5a_{n+1}-6a_n.$$
You can reach the same conclusion by noting that the characteristic polynomial has roots $2$ and $3$, hence is $$r^2-5r+6,$$ corresponding to the recurrence
$$a_{n+2}-5a_{n+1}+6a_n=0.$$