Given a sequence a(n) = a(n -2) , a(0) = 2 , a(1) = -1
Find the generating function
What i have done so far:
The recurrence relation is going to be a(n) - a(n-2) = 0
A = the generating function
A = 2 - x + 2x^2 - x^3 + 2x^4.......
x^2 * A = 2x^2 - x^3 + 2x^4 ..........
- subtracting the two equations.
1-x^2 A = 2 -x
divide both sides by 1-x^2
A = 2-x / 1-x^2
This is how i was taught to do it , but when u plug in numbers for x , it doesnt seem to satisfy the premise.