2

If I'm given $n^2+n+17$ and I'm asked to find some $n\in \mathbb N$ such that the polynomial is not prime, is there any reasoning I can use to quickly find a counter-example?

It took a good minute for me to guess one counter-example, $n=17$. But is there a way I could have found a counter example without some lucky trial-and-error?

J. W. Tanner
  • 60,406
Lex_i
  • 2,072
  • 10
  • 26

2 Answers2

3

$n=17$ is a good choice, because if $17$ divides $n$, then $17$ divides $n^2$ and $n^2+n+17$.

J. W. Tanner
  • 60,406
0

Adding on slightly to J. W. Tanner's excellent answer, if we have the quadratic $$ax^2+bx+c$$ then a value for $x$ that makes this composite (non-prime) will be the lowest common multiple of $a,b,c$ (assuming all the coefficents aren't $1$).

If any of the coefficients are negative, then I suppose you'd need to check if this input is indeed positive.