<s>[INST] Finding a polynomial by divisibility 
Let $f(x)$ be a polynomial with integer coefficients. If $f(x)$ is divisible by $x^2+1$ and $f(x)+1$ by $x^3+x^2+1$, what is $f(x)$?

My guess is that the only answer is $f(x)=-x^4-x^3-x-1$, but how can I prove it?
 [/INST] In fact, there are infinitely many solutions. If $f(x)=-x^4-x^3-x-1$ and $g(x)$ is any polynomial, then
$$f(x)+g(x)(x^2+1)(x^3+x^2+1)$$
is a solution.
</s>