It just follows the general rule.
All positive powers of i 0mod4 give you 1.
All positive powers of i 1mod4 give you i.
All positive powers of i 2mod4 give you -1.
All positive powers of i 3mod4 give you -i.
Of course, you have to stop and think, because you're now going backwards, but when you have i^4 and you take one from the power you get i^3=-i, so if you have i^0 and you take one from the power, you get i^-1=-i.