# Can we always find some polynomial for which this holds?

I do not know if this is an easy exercise but is this true:

For every $n \in \mathbb N$ there exist at least one polynomial $P$ in one variable with integer coefficients such that the set $\{P(1),\dots,P(n)\}$ consists of only prime numbers and all of them are different?

• I guess that the point is that Lagrange interpolation generates polynomials with rational coefficients. Which lead me to this unanswered question: math.stackexchange.com/questions/1467910/…. – lhf Dec 8 '16 at 0:56

## 1 Answer

Let $V$ be the $n \times n$ Vandermonde matrix whose $(i,j)$ entry is $i^{j-1}$, $i=1..n$, $j=1..n$. Note that this is invertible, and $V (1,0,\ldots,0)^T = (1,\ldots,1)^T$. Let $p_1, \ldots, p_n$ be primes such that $p_i \equiv 1 \mod \det(V)$ (by Dirichlet's theorem, infinitely many such primes exist). Then $V^{-1} (p_1, \ldots, p_n)^T = (a_0, \ldots, a_{n-1})^T$ is a vector of integers, and $P(x) = \sum_{j=0}^{n-1} a_j x^j$ satisfies $P(i) = p_i$ for $i=1 \ldots n$.

• Just to try this out: with $n=5$, we have det$(V)$=288, and the smallest primes congruent to 1 mod $288$ are 577,1153, 2017, 2593, and 3169. We get $P(x)=36x^4 - 456x^3 + 1980x^2 - 2712x + 1729$ and it does the trick. Very cool! – Matthew Conroy Dec 8 '16 at 0:41