2

There does not exist a polynomial $p(x)$ with integer coefficients which gives a prime number $\forall x\in \mathbb{Z}$

My attempt:

I defined a polynomial as $p(x)=a_0(x-a_1)(x-a_2)\ldots(x-a_n)$. So, whenever $x$ takes an integer value, the polynomial cannot generate a prime number unless the polynomial is a linear one. But I have serious doubts about this solution, suppose any factor is of the form $(x^2+x+1)$ which cannot be factorised into linear factors with integer coefficients. Please help. Thank you.

Swadhin
  • 1,381
  • See "Formula based on a system of Diophantine equations" at https://en.wikipedia.org/wiki/Formula_for_primes – Meekohi Jan 13 '23 at 20:01

2 Answers2

10

Hint $\ $ If $\,f(n)\,$ is prime for all $\,n\,$ then $\,f(0) = p\,$ is prime, and since $\, p\mid f(pn)\,$ and $\,f(pn)\,$ is prime, then $\,f(pn) = p\,$ for all $\,n.\,$ Thus the polynomial $\,f(px)-p\,$ has infinitely many roots so is zero, i.e. $\,f(px) = p\,$ is constant, hence $\,f(x)\,$ is constant.

Bill Dubuque
  • 272,048
2

Hint: If a polynomial, $p$ has integer coefficients, then for any integers $m,n$ with $m\ne n$, $n-m$ divides $p(n)-p(m)$.

Edit: (In response to comment):

One way to use this hint would be to note that for a polynomial that produces primes for all integers, we would have $p(0)=q$ for some prime $q$. But then $p(q)$ would be divisible by $q$, and so would $p(2q), p(3q),$ etc. But these values couldn't all be the prime $q$ since a polynomial takes any given value at most finitely many times. (I suppose the (trivial?) counterexample would be a constant polynomial whose constant value is a prime.)

paw88789
  • 40,402