# Find a non-trivial polynomial which has all integers as zeros modulo $p$

This is an exercise from the book "Einführung in die algebraische Zahlentheorie" by Alexander Schmidt. Let $$p$$ be a prime number. And let $$f \in \mathbb{Z}[X]$$ be a polynomial with integer coefficients such that it is not the zero polynomial modulo $$p$$ ($$f \not\equiv 0 \pmod p$$). But such that $$f(a)\equiv 0 \pmod p$$ for all $$a\in \mathbb{Z}$$.

• Multiply that by $x$? Jun 19, 2019 at 6:07
• Good point. Thanks for the hint. I will remove the $f(x) = x^{p-1} - 1$ from the question to allow for a more non-trivial answer. Jun 19, 2019 at 6:16
• Try the product $\prod_{i=0}^{p-1} (x-i)$. Jun 19, 2019 at 6:30
• Indeed, the set of such polynomials is exactly the set of multiples of $x^p-p = \prod_{i=0}^{p-1} (x-i)$. Jul 3, 2019 at 4:59

Let's assume that $$f\in F_p[X]$$ is a non-zero polynomial with all $$a\in F_p$$ as roots. When $$a\in F_p$$ is a root, $$(x-a)$$ is a factor, thus $$f(x)=g(x)\prod_{i=0}^{p-1} (x-i)$$ for some non-zero $$g\in F_p[X]$$. We also see that every polynomial on the form $$g(x)\prod_{i=0}^{p-1} (x-i)$$ has every $$a\in F_p$$ as a root. We conclude that the polynomials are precisely the ones on the form: $$g(x)\prod_{i=0}^{p-1} (x-i),$$ where $$g\not\equiv 0$$.

• Welcome, Frederick. In effect, the theory of finite fields says that every finite extension of the prime field $\mathbb F_p$ has $p^n$ elements and that in the algebraic closure of $\mathbb F_p$ there exists a unique subfield with as many elements as the considered extension of $\mathbb F_p$ and that is constituted by the roots of the polynomial $f(X)=X^{p^n}-X$. Jul 3, 2019 at 21:23