Finding $n$ such that $\frac{n^4 + 1}{n^2 +n + 1}$ is an integer 
Find all integers such that $\dfrac{n^4 + 1}{n^2 +n + 1}$ is an integer. 

I have no idea how to solve things like this and what i tried to do didn't get me anywhere. I'd be grateful for any help! 

HINT:
$$n^4+n^2+1=(n^2)^2+1^2+n^2=(n^2+1)^2-n^2=(n^2-n+1)(n^2+n+1)$$
$$\implies \frac{n^4+1}{n^2+n+1}=n^2-n+1-\frac{n^2}{n^2+n+1}$$
So, $n^2+n+1$ must divide $n^2$
But $(n^2,n^2+n+1)=1$ (Proof Below)
$\implies n^2+n+1=\pm1$ as $ n^2+n+1$ being denominator $\ne0$
If $ n^2+n+1=-1\implies n^2+n+2=0\implies n=\frac{-1\pm\sqrt{1^2-4\cdot1\cdot2}}2=\frac{-1\pm\sqrt7i}2$ which is not real.
If $ n^2+n+1=1\implies n(n+1)=0\implies n=0,-1$
[
Proof :
 If prime $p>1$ divides both $n^2, n^2+n+1$
$p$ will divide $(n^2+n+1)-n^2=n+1$
As $p$ is prime, $p$ divides $n^2\implies p$ divides $n$
Then $p$ divides $(n+1)-n=1$ clear contradiction as $p>1$
]
