<s>[INST] Find the quotient and the remainder of $(n^6-7)/(n^2+1)$ 
Given that $n$ belong to $\mathbb{N}$.
Find the quotent and the remainder of $(n^6-7)/(n^2+1)$.

So I tried to divide them up and got a negative expression $(-n^4-7)$.
How to continue?
Or what can be done differently?
How to find the quotent and the remainder?
 [/INST] $\bmod n^2\!+1\!:\,\ \color{#c00}{n^2\equiv -1}\,\Rightarrow\, n^6\equiv (\color{#c00}{n^2})^3\equiv (\color{#c00}{-1})^3\equiv -1$  so $\,n^6-7\equiv -8$ is the remainder,  
hence the quotient is $\ \dfrac{(n^6-7)-8}{n^2+1} = \dfrac{n^6+1}{n^2+1} = n^4 - n^2 + 1$
</s>