Can second degree polynomials generate as many as we wish prime numbers in the way described?

While I was getting in my pyjamas, a few minutes ago, the Euler polynomial $n^2+n+41$ came into my mind. As you know, this polynomial is famous because the set $\{f(0),f(1),...f(39)\}$ consists of prime numbers only, so this polynomial takes for the first $40$ of its values on the set $\mathbb N_0$ only prime numbers.

So the natural question to ask is:

Is it true that for every $m \in \mathbb N$ there exists second degree real polynomial of a real variable $P$ and a number $k(m) \in \mathbb N$ such that all numbers in the set $\{P(k(m)), P(k(m)+1),...,P(k(m)+m-1)\}$ are prime numbers?


Solution 1:

Yes. In fact, you don't even need the quadratic term: there are degree-$1$ polynomials giving arbitrarily long sequences of primes by the Green-Tao theorem. (Of course, you could also let $P$ be a constant prime).

Solution 2:

This follows by the Green-Tao theorem: there exist arbitrarily long arithmetic sequences of primes.
If $$ak+b,a(k+1)+b,\ldots,a(k+m^2)+b$$ are prime, we can take $P(n)=a(k+n^2)+b$, being prime for $n=0,\ldots,m$.

Note that the same works if we require $\deg P=1$.