Problem

Source: 2023 Serbia TST Problem 4

Tags: algebra, polynomial, Serbia, TST



Let $p$ be a prime and $P\in \mathbb{R}[x]$ be a polynomial of degree less than $p-1$ such that $\lvert P(1)\rvert=\lvert P(2)\rvert=\ldots=\lvert P(p)\rvert$. Prove that $P$ is constant.