# Prove or disprove $\forall n \in N$ integer $2n^2 - 4n + 31$ is prime

I'm stuck on this problem. In general, what is the approach to prove that some number is prime?

• What happens when $\, N = 31?\$ – Bill Dubuque Jul 29 '16 at 23:24
• No non-constant polynomial with integer coefficients produces only primes. – Peter Jul 29 '16 at 23:24
• wolframalpha.com/input/… – Zack Ni Jul 29 '16 at 23:28
• See here for a proof that only constant polynomials can always take prime values. – Bill Dubuque Jul 29 '16 at 23:28

What happens to $2n^2-4n+31$ when $n=31$?

On the other hand, there are infinitely many pairs $n,w$ for which $$2 n^2 - 4 n w + 31 w^2$$ is prime. You should find some of those.

As $2n^2 - 4n + 31=n(2n-4)+31$, hence for each $n=31k\in \mathbb{N}$, we have $$2n^2 - 4n + 31=31k(62k-4)+31=31\left( k(62k-4)+1 \right),$$ and so it is not a prime.

For any polynomial, if you substitute in the constant term for the variable, the value will be divisible by the constant term. As long as the constant is not $1$ and the value is not the same as the constant, you will have a composite value. For your example, if we set $n$ to $31$ we get $2\cdot 31^2-4\cdot 31+31=1829=59\cdot 31$. Using any multiple of the constant term works as well.