Here's a simple polynomial that generates quite a few primes (not necessarily consecutive).
$p(n) = n^2 + 23n + 23$ with $n=0,1,2... $
What can such polynomials tell us about primes? Thanks.
I am posting the general method to generate an infinite number of these prime generating polynomials because I think it may be useful to their study.
I will provide the example of the polynomial starting with the integer 1 and using square integers, namely the main diagonal of the classical multiplication table.
p(n) = (1+n)(1+n) + 2 + n
We see here that for n=0, p(0) = 3. Adding 2 is done to precisely achieve that result, that is to get a prime. The rest will take care of itself.
p(n) = n^2 + 3n + 3
Now there is nothing special about the starting point 1, the first integer. One can build a quadratic prime generating polynomial for every integer. As an example, here's the polynomial starting with the integer 2.
p(n) = (1+n)(2+n) + 1 + 2n = n^2 + 5n +3
The only reason the term 2n was added instead of n, like above, is because we need p(n) to be odd for every single value of n and the starting integer is even.
The first polynomial I posted had in fact a starting point of 21, not 23.
p(n) = (21+n)(1+n) + 2 + n = n^2 + 23n + 23
The choice of adding 2 is dictated by the fact that 23 is the next prime if we are starting at 21. But there is no rule that says we can't use 8 and get 29 as the next prime. It's just that there is no rational motivation to skip a prime.