I have to find the recurrence relation by the sequence

a(x) = x - (-1)^x

initial conditions are x(0) = -1 x(1) = 2

A(x) - a(x-1) = x-(-1)^x – (x-1) + (-1)^x-1

A(x) = x-(-1)^x – (x-1) + (-1)^x-1 + a(x-1)

A(x) = a(x-1) – 2*(-1)^x +1

i believe I've done this correctly.. but i just wanted to make sure.. any help would be appreciated! danke