Polynomial: $p(x) = p(x+3)$.

Hint $\ $ $\rm\:p(x)\:$ is constant $\rm = p(0)\:$ since $\rm\:p(x)-p(0)\:$ has infinitely many roots $\rm\:x = 0,3,6,9\ldots$ hence is the zero polynomial.

Remark $\ $ I presume that your polynomial has coefficients over some field such as $\rm\:\Bbb Q, \Bbb R, \Bbb C,\:$ where the subset $\rm\{0,3,6,\ldots\}$ is infinite. It may fail otherwise, e.g. $\rm\:p(x\!+\!3) = p(x)\:$ for all polynomials over $\rm\,\Bbb Z/3 =$ integers mod $3.$

Generally, that a polynomial with more roots than its degree must be the zero polynomial, is equivalent to: $ $ the coefficient ring $\rm\,R\,$ is an integral domain, i.e. for all $\rm\:\forall a,b\in R\!:\:$ $\rm\: ab=0\:\Rightarrow\:a=0\ \ or\ \ b=0.$


An addendum to the other answers. You did not specify a field. In positive characteristic $p \ne 3$ there are non-constant polynomials with this property, for instance $$ x (x+3) (x+3 \cdot 2) \dots (x + 3 (p-1)). $$

In characteristic $3$ the condition of course holds for all polynomials.


All of the above answers are algebraic. Let's get some calculus argument:

Every non-constant polynomial has $\lim\limits_{x\to\infty} p(x)=\pm\infty$. But for a polynomial with $p(x)=p(x+3)$, you can take the sequence $x_n=x_0+3\cdot n$, which clearly advances to $\infty$ and yields $p(x_n)=p(x_{n-1}+3)=p(x_{n-1})=\ldots=p(x_0)$, which is a constant sequence. So for this polynomial $p(x)$ $\lim\limits_{x\to\infty} p(x)=\pm\infty$ is clearly wrong and the polynomial has to be constant.


Math Gems answer is what you're looking for. However, I just wanted to add something interesting. I'm assuming the $x$ in your question is a real number, integer, etc. However, if you allow $x$ to be an element of a finite field, then it doesn't follow that "periodic" polynomials must be zero. For example consider, $p(x)=x^{p}-x \in \Bbb F_{p}[x]$, then:

$p(x+3)=(x+3)^{p}-(x+3)=x^{p}+3^{p}-x-3=x^{p}+3-x-3=x^{p}-x=p(x)$.

The important facts here are in a field of characteristic $p$, $(x+y)^{p}=x^{p}+y^{p}$ and $a^{p}=a$. Also, the $3$ wasn't particularly important here, and could be replaced with any integer.