How to demonstrate that there is no all-prime generating polynomial with rational cofficents? It seems like there is no polynomial with finite variables known, which could generate all prime numbers, by integer assignments. Is there a proof that such polynomial can not exist and does anyone have one in his/her stack?
In fact there does not even exist a non-constant polynomial $f$ (I assume you want integer coefficients) which only takes prime values with integer inputs. It suffices to prove this for polynomials in one variable. By the hypothesis that $f$ is non-constant, it takes arbitrarily large values, so without loss of generality $|f(0)| &gt; 1$; in particular, $f(0)$ is divisible by some prime $p$. Then $f(kp)$ is always divisible by $p$, hence cannot be prime for sufficiently large $k$. 

However, remarkably there do exist polynomials in more than one variable all of whose positive values are prime.
Consider a polynomial P(n) with integer coefficients;
also, assume that the constant term (coefficient of n^0), is a0.

Case 1) a0 != 1 :
        Then, putting n=c*a0, where c is a non-zero integer, shall yield a multiple of a0. 

In general, P(c*P(1)+1) shall always be divisible by P(1). Hence, the given polynomial cannot generate only primes!!