2
$\begingroup$

Problem: Find all values of $n$ where $2n^2+7n+3$ is prime.

What I know: All prime numbers are only divided by one and themselves. To reach a solution, I need to factor the polynomial and equal the binomials to 1. I did it: $2n+1=1$ and $n+3=1$, and the solutions are $n=0$ and $n=-2$ Then $n=0$ is the only viable solution to produce primes.

What I don't understand:

  1. why this works.
$\endgroup$
6
  • 3
    $\begingroup$ The solution only consists in finding the factorisation $p=2n^2+7n+3=(2n+1)(n+3)$ as you said. Obviously $p$ cannot be prime, because it is then composite for positive integers $n$ by the factorization. For $n=0$ we obtain $p=3$. So I don't understand your questions 1,2,3. $\endgroup$ Commented Feb 18 at 10:43
  • 2
    $\begingroup$ Why the down vote? $\endgroup$ Commented Feb 18 at 10:44
  • $\begingroup$ Not that it gives another solution but $n+3=1$ gives $n=-2$ not $-3$. $\endgroup$
    – Aig
    Commented Feb 18 at 10:46
  • $\begingroup$ @Aig Usually $n$ is a positive integer for this exercise. I suspect that the OP forgot to mention this. Then both $-2$ and $-3$ are not allowed and it doesn't matter. But if all integers are meant, then yes. $\endgroup$ Commented Feb 18 at 10:47
  • $\begingroup$ @DietrichBurde Yes, but OP still writes both roots in their reasoning, one of them is wrong. $\endgroup$
    – Aig
    Commented Feb 18 at 10:48

1 Answer 1

7
$\begingroup$

It seems that you know, at least vaguely, what to do but not why it works, so let's go through the reasoning. We are given a polynomial $$f(n) = 2n^2 + 7n + 3,$$ and we are asked to find all integers $n$ such that $f(n)$ is equal to some prime $p$. Obviously, some trick is needed here: There are infinitely many candidate values of both $n$ and $p$, so we can't just check them all; we need to somehow eliminate infinitely many cases at once. This is where the factorization $$f(n) = (2n + 1)(n+3)$$ comes into play. Notice that whichever integer $n$ we pick, this lets us express $f(n)$ as a product of two integers. This immediately tells us that $f(n)$ will not be prime in most cases, because there are only four ways of writing a prime $p$ as a product of two integers, those being $$(\pm 1)\cdot(\pm p) \quad \text{and} \quad (\pm p)\cdot(\pm 1).$$ Thus, if $f(n) = p$, we must have either $$2n+1 = \pm 1, \qquad n+3 = \pm p$$ or $$2n+1 = \pm p, \qquad n+3 = \pm1.$$ Notice how in each of these four cases, we have an equation that does not depend on $p$. This is exactly what we want: Even though there are infinitely many primes $p$ that $f(n)$ could potentially be equal to, in every case one of the four equations $$2n + 1 = 1, \quad 2n + 1 = -1, \quad n + 3 = 1, \quad n + 3 = -1$$ must hold for $f(n)$ to be equal to $p$. We have thus eliminated all values of $n$ except for the solutions to the four equations above, those being $0, -1, -2$ and $-4$ respectively. Well, those are just finitely many cases that we can check by hand: $$f(0) = 3, \quad f(-1) = -2, \quad f(-2) = -3, \quad f(-4) = 7.$$ We conclude that the only integers $n$ for which $f(n)$ is prime are $0$ and $-4$ (and $-1$ and $-2$ if you allow negative primes).

$\endgroup$
1
  • $\begingroup$ This is a clear and concise explanation, thank you for your insight and time @sbares. $\endgroup$
    – MomoPrime
    Commented Feb 18 at 18:08

Not the answer you're looking for? Browse other questions tagged .