Given that x is a positive integer, prove that $f(x) = x^2 + x + 1$ will never be divisible by $5$.

I've tried a contrapostive proof so far: Assume $f(x)$ is divisible by $5$. Then, $x^2 + x + 1 = 5p$ for some integer $p$.

$x(x+1) + 1 = 5p$

Since $x(x+1)$ has to be even because an even number times an odd number if even, $x(x+1)$ is odd. Thus, p is odd (the product of 5 and an odd number is an odd number). Thus:

$x(x+1) + 1 = 5(2n+1)$ for some integer $n$.

$x^2 + x - (10n+4) = 0$.

I need to show that x is NOT an integer, but I'm not sure how to proceed from here. Help?

  • 2
    $\begingroup$ Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. $\endgroup$ – José Carlos Santos Feb 18 '18 at 17:46
  • $\begingroup$ You can try with induction. $\endgroup$ – user152715 Feb 18 '18 at 17:49
  • $\begingroup$ Do you mean $f(x)=x^2 + x+1$ will never be divisible by five? $\endgroup$ – amWhy Feb 18 '18 at 17:51
  • $\begingroup$ In this type of questions I used to work as follows: $\mathbb{N}$ can be splitted into sets of the form $\{5k\}, \{5k+1\}, \{5k+2\}, \{5k+3\}, \{5k+4\}$ replacing case by case in your formula, it-s easy to check that no one of them has remainder 0. $\endgroup$ – Valerin Feb 18 '18 at 18:09
  • $\begingroup$ Hint: is (x−5) a factor of the polynomial? How does that help us? (Sorry for posting this as an answer earlier, btw) $\endgroup$ – Ranjeev Grewal Feb 18 '18 at 18:39

Check $$0^2+0+1\not\equiv0,$$



$$3^2+3+1\not\equiv0$$ and



Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.