Let [tex]N[/tex] be any integer. Then
[tex]i^N=\begin{cases}1&\text{if }N\equiv0\mod4\\i&\text{if }N\equiv1\mod4\\-1&\text{if }N\equiv2\mod4\\-i&\text{if }N\equiv3\mod4\end{cases}[/tex]
In other words:
(1) If [tex]N[/tex] is a multiple of 4, then [tex]i^N=1[/tex].
(2) If dividing [tex]N[/tex] by 4 leaves a remainder of 1, then [tex]i^N=i[/tex], since [tex]i^N=i^{4n+1}[/tex] for some integer [tex]n[/tex], and from (1) we know that [tex]i^{4n+1}=i^{4n}i=i[/tex] (because, obviously, [tex]4n[/tex] is a multiple of 4).
(3) If instead you get a remainder of 2, then [tex]i^N=-1[/tex]. This follows from (1) as well. [tex]i^N=i^{4n+2}=i^{4n}i^2=(1)(-1)=-1[/tex].
(4) Finally, if you get a remainder of 3, then [tex]i^N=i^{4n+3}=i^{4n}i^2i=(1)(-1)(i)=-i[/tex].