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?

One way you could express this idea is through functions $g,h$ where $$f(x) = g(x)(x^2+1) \\ f(x)+1 = h(x)(x^3+x^2+1)$$ This means that $$g(x)(x^2+1)+1 =h(x)(x^3+x^2+1)$$ or that $$h(x) = \frac{g(x)(x^2+1)+1}{x^3+x^2+1}$$ So you could begin by choosing any polynomial $g$ you want so long as it forces $h$ to be a polynomial. Then $f$ will be a polynomial.
