Show that there is no integer polynomial that only outputs prime numbers. (Hint: Suppose that f(a) = p and then consider f(a + p)).
I do not actually know how to follow the hint. Could somebody help me? Thanks so much.
Show that there is no integer polynomial that only outputs prime numbers. (Hint: Suppose that f(a) = p and then consider f(a + p)).
I do not actually know how to follow the hint. Could somebody help me? Thanks so much.
Say we have a polynomial of degree $N$: $$f(x)=\sum_{k=0}^{N}a_kx^k$$ with $a_N\neq 0$. Now, if we have a prime $p$, then $x^n\equiv (x+p)^n\pmod p$ and hence for all primes $p$ and $x\in\Bbb{N}$: $$f(x)\equiv f(x+p)\pmod p$$ (This is not only true for primes, but it's what we need.)
Now, suppose $f(a)=p$. Then for all $k\in\Bbb{Z}$, we have: $$p\mid f(a+pk)$$ So in order for $f$ to be prime for every value, we need $f(a+pk)=p$ for every integer value of $k$. But this is impossible, since $f$ only has degree $N$, so $g(x)=f(x)-p$ can only have $N$ roots.
Hint $\ {\rm mod}\ p\!:\ f(a+np) \equiv f(a)\equiv 0\ $ by the Polynomial Congruence Rule.