Given that $i^2=-1$, for how many integers $n$ is $(n+i)^4$ an integer?
$\text{(A)} \ \text{none} \qquad \text{(B)} \ 1 \qquad \text{(C)} \ 2 \qquad \text{(D)} \ 3 \qquad \text{(E)} \ 4$
$(n+i)^4=n^4+4in^3-6n^2-4in+1$, and this has to be an integer, so the sum of the imaginary parts must be $0$. \[4in^3-4in=0\] \[4in^3=4in\] \[n^3=n\]
Since $n^3=n$, there are $\boxed{3}$ solutions for $n$: $0$ and $\pm1$.
-aopspandy