<s>[INST] Remainder of dividing polynomial of the $n$th degree 
What is the remainder when dividing the polynomial
$$P(x)=x^n+x^{n-1}+\cdots+x+1$$ with the polynomial
$$x^3-x$$ if $n$ is a natural odd number?

So, what I know so far is:
$$P(x)=Q(x)D(x)+R(x)$$
In this case I'll call $Q(x) = x^3-x$
$$Q(x) = 0 \iff x=\pm1$$
So from here:
$\begin{array} {l}P(1):\qquad&1^n+1^{n-1}+\cdots+1^1+1=R(1)\\P(-1):&(-1)^n+(-1)^{n-1}+\cdots+(-1)^1+1=R(-1)\end{array}$
Here is where I assumed that $R(x)=ax^2+b$ since $Q(x)=x^3-x$
And from the equations (assuming $n = \{2k+1 \mid k\in\mathbb{N}\}$):
$\begin{array}{l}P(1):\\&R(1)=n\\P(-1):\\&R(-1)=0\end{array}$
And here I get to:
$$\left\{
\begin{array}{ll}
ax^2+by &=n \\ 
ax^2+by &=0 \\ 
\end{array} 
\right.$$
I would like to know where did I go wrong? Is my assumption for $R(x)$ incorrect, my calculation of the $P(1)$ and $P(-1)$ wrong or is there something else I didn't think about?
 [/INST] Your approach is fine but you've missed the root $x=0$ of $x^3-x$.
We get $R(0)=P(0)=1$, $R(1)=P(1)=n+1$, $R(-1)=P(-1)=0$.
The quadratic polynomial that interpolates this data is $\frac{n-1}{2} x^2+\frac{n+1}{2}x+1$.
The same approach works when $n$ is even (the interpolation data is different because $P(-1)=1$) and we get $\frac{n}{2} x^2+\frac{n}{2}x+1$.
In both cases, we get the nice recurrence: $R_{n+2}=R_n+x^2+x$, with $R_0=1$ and $R_1=x+1$.
</s>