Is there any polynomial such that $f'(a)=f'''(a)=0$ but$ f''(a)\ne 0$? In my class, I learned that
For a polynomial with $f(a)=f'(a)=f''(a)=\cdots=f^{(n-1)}(a)=0$, where $deg f(x) \ge n$
Then $f(x)$ is divisible by $(x-a)^n$
Then a question is popped up in my mind whether there exist a real polynomial $f$ which
$f^{(r)}(a)=f^{(r+2)}(a)=0$ but $f^{(r+1)}(a)\ne0 $ for some $a\in \mathbb R$ ?
 A: Sure. Try $f(x) = x^4 - x^2$ and $a = 0$.
A: For a function with Taylor expansion at $x=a$, $$f(x) = \sum_{k=0}^\infty \frac{a_n}{n!}(x-a)^n$$
it is well known that $a_n = f^{(n)}(a)$. If $p$ is a polynomial, of course its analytic, so Taylor's theorem applies, and even better their Taylor expansion only has $N+1$ terms where $N:=\operatorname{deg}p$,
$$p(x) = \sum_{k=0}^N \frac{a_n}{n!}(x-a)^n$$
In particular by choosing $a_n$ however you wish, you can prescribe an arbitrary (finite) sequence of derivatives at a point. Example: you want a degree 6 polynomial with nonzero 4th derivative at $π$, but 3rd,5th derivatives 0. No problem, just make sure the coefficient of $(x-π)^k$ is $0$ for $k=3,5$ and not zero for $k=4$, e.g.
$$ p(x) = \frac{-10}{3}(x-π)  + (x-π)^4 + (x-π)^6$$
You can also easily prove from this formula the result from your class that $a_i = 0$ for all $i≤N_0$ implies $(x-a)^{N_0} \mid p(x)$.
A: If $f(x)=\sum_{k=1}^nb_k(x-a)^k$, then $f^{(r)}(a)=f^{(r+2)}(a)=0$ implies $b_{r}=b_{r+2}=0$, and $f^{(r+1)}(a)\neq 0$ implies $b_{r+1}\neq0$. Obviously such polynomial exists.
A: The derivative of any polynomial in the form of $k(x-a)^m$ is just $km(x-a)^{m-1}$, so the $m$th derivative is $km!(x-a)^0=km!$ and the $(m+1)$th derivative is $0$
So if the highest degree is $\ge2$ more than the second highest degree you will have this
A: Scratch work (to make mathematical thinking more transparent):
Let us pick functions that are all nicely differentiable etc.
Okay: Let us make $f''(x)$ constant but not the $0$ function. How about $f''(x) = 1$?
This would mean $f'(x) = x + c$ for some constant $c$; how about using $c = -1$ to get a zero at $x=1$? Seems simple.
Okay, so $f'(x) = x - 1 $ hence $f(x) = x^2/2 - x + c$ for yet another constant $c$; there are no restrictions, so let us use $c = 0$ to keep things simple.

The fraction is a bit annoying, so let us go back in time and have $f''(x) = 2$, so that we could have $f'(x) = 2x - 2$ and $f(x) = x^2 - 2x$.
As in the title of the question, we have $f'(1) = f'''(1) = 0$ since $1$ is a root of $f'$, and since $f''' \equiv 0$. But, we also have that $f''(1) = 2 \neq 0$ because $f'' \equiv 2$.
Answer: Yes, this was quite possible.
