Theory
Write n = 4q + r where r is the remainder when dividing by 4.
Then:
TEXT
i^n = i^{4q+r} = (i^4)^q i^r = 1^q i^r = i^r
So the value depends only on r = 0,1,2,3.
Write n = 4q + r where r is the remainder when dividing by 4.
Then:
i^n = i^{4q+r} = (i^4)^q i^r = 1^q i^r = i^r
So the value depends only on r = 0,1,2,3.