Given that i2 = -1, for how many integers n is (n + i)4 an integer?
Expand (n + i)4 to see what it looks like:
(n + i)4 = n4 + 4n3i + 6n2i2 + 4ni3 + i4
= n4 + 4n3i – 6n2 – 4ni + 1
= n4 + 4n(n2 – 1)i – 6n2 + 1
= n4 + 4n3i – 6n2 – 4ni + 1
= n4 + 4n(n2 – 1)i – 6n2 + 1
This is an integer only if the imaginary part is 0, i.e.,
0 = 4n(n2 – 1) = 4n(n + 1)(n – 1), thus n = 0, 1, -1.
So (n + i)4 is an integer for 3 values of n.