I have the following sequence: where i and p are constants. I need to find an equation for the sequence that is independent of the previous elements except .

The Z-transform gives: or .

Doing partial fractions yields:

Now when I take the reverse Z-transform with gives me the wrong answer. If I substitute instead, I get the correct answer. Any ideas what I've done wrongly?

P.S.

I thought I had made a mistake and it should be instead of , but I double checked everything and cannot find any mistakes. That would suggest I've probably made a mistake in the Z-transform.