Let $p(x)$ be a polynomial with real coefficients and with $\deg p \le 2$. Prove that if
$$\sum_{x=1}^n p(x) = \sum_{x=1}^n xp(x) = \sum_{x=1}^n x^2p(x) = 0$$
for some positive integer $n$, then it follows that $$\sum_{x=1}^n x^3p(x)=0$$
I've tried explicitly finding the sums using $p(x) = ax^2+bx+c$, and then using sum of $n$th power formulas to simplify, but it seems very ugly. Is there a nice way to go about this?
If $n=1$ or $n=2$ it follows right away that $p(k)=0$ for $k=1 \dots n$ so $\sum_{k=1}^{n} k^3 p(k) = 0$ as well.
For $n \ge 3$ the result follows from the stronger proposition taken from AMM problem 11886, asked and proven at Discuss the inequality different methods...
($\dagger$) The equality case is not spelled out in the linked post, but follows by observing that the inequalities become strict unless $2y_{k+1} = y_{k}+y_{k+2}$ for $\forall k$ i.e. the sequence is linear.
To see how the above relates to the question here, first note that given $p(x)=a x^2 + b x + c$ it can be assumed WLOG that $a \ge 0$, otherwise simply replace $p(x)$ with $-p(x)$.
Then $p(x)$ is a convex function, thus $y_k = p(k)$ is a convex sequence so that $y_{k+1} \le \frac{1}{2}(y_k+y_{k+2})$.
Therefore the conditions for AMM 11886 are satisfied, and with $\sum_{k=1}^{n}k y_k = \sum_{k=1}^{n}k^2 y_k = 0$ the inequality reduces to the equality case $0=0$. It follows that $y_k$ must be an arithmetic progression, so $p(x)$ must be a linear function i.e. $a=0$. Substituting $y_k = bk+c$ back in $\sum_{k=1}^{n}k y_k$ = $\sum_{k=1}^{n}k^2 y_k = 0$ gives $b=c=0$. This proves that $p(x) \equiv 0$ and therefore $\sum_{k=1}^{n} k^3 p(k) = 0$.
P.S. As a comment, the direct solution (explicitly calculate the sums, then show that the $\text{3x3}$ determinant made from the coefficients of $a,b,c$ is non-$0$) is probably both easier and more natural.