Function that maps prime numbers to prime numbers I know that there is not a polynomial $f$ function  that according to every $x\in N, f(x) $     be prime
I wonder that how can i prove or disprove this:


Is there  a polynomial $f$ function that : for every prime $x$, $f(x)$ is also prime?

For example, with the help of my $C\# $ code I found   that for each $i\in[1,31]$ 
let $x=p_i,$ $p_i$ is $i$-th prime number $(p_1=2,p_2=3,p_3=5,...)$  then
$f(x)=\left\lvert2x^2-92x+859\right\rvert$ $-$ is prime


\begin{alignat*}{3}
i&=1\quad&&\longrightarrow\quad x=2,&&&f(x)=\left\lvert2*2^2-92*2+859\right\rvert=683\quad\longrightarrow\quad \text{prime}\\
i&=2 \quad&&\longrightarrow\quad x=3,&&&f(x)=\left\lvert2*3^2-92*3+859\right\rvert=601\quad\longrightarrow\quad \text{prime}\\
i&=3 \quad&&\longrightarrow\quad  x=5,&&&f(x)=\left\lvert2*5^2-92*5+859\right\rvert=449\quad\longrightarrow\quad \text{prime}\\
&\ \  \vdots\\
i&=31 \quad&&\longrightarrow\quad  x=127,\ &&&f(x)=\left\lvert2*127^2-92*127+859\right\rvert=21433\quad\longrightarrow\quad \text{prime}\\
\end{alignat*}
I have watched $2$ degree polynomials (in form : $ax^2+bx+c$) and cant find any solution of $i_{max}>31$ where :  $-1000<a,b,c<1000$
 A: One can show that only polynomial functions with the property that they map prime numbers to prime numbers are $f(x)=x$ and constants $f(x)=c$ where $c$ is prime. 
Basically, the idea is the following: since we're assuming $f(x)\neq x$, there must exist some prime $p$ such that $f(p)=q$ for a prime $q\neq p$ (otherwise, we can pick enough primes with $f(p)=p$ so that $f(x)=x$ by Lagrange interpolation). 
This means that whenever $n$ is congruent to $p$ modulo $q$, we have $f(n)$ is divisible by $q$. Now, apply Dirichlet's theorem to the arithmetic sequence $kq+p$ for $k=1,2,\ldots$ to see that there must be arbitrarily big primes $r$ congruent to $p$ modulo $q$. Since we're assuming $f$ is nonconstant, this means that taking such $r$ big enough, $f(r)$ will be bigger than $q$ and divisible by $q$ - a contradiction!
Edit: Here, I'm tacitly assuming that the polynomial has integer coefficients. However, this can be circumvented using the assumptions as well. First, observe tha by Lagrange interpolation, $f$ has rational coefficients. This means we cah write $f(x) = t(x)/N$ for some integer $N$ and some polynomial with integer coefficients $t$. Now, we do the same thing as above, but applied to $t$, and with the exception that we insist on $q>N$.
