If we want $n^2+3n+6$ to be divisible by $25$, it firstly has to be divisible by $5$. So, let's take a look at couple of cases: $n=5k: 25k^2+15k+6$. The remainder is $6$, so it's not divisible by $25$.

$n=5k+1: 25k^2+25k+10$. The remainder is $10$, so it is not divisible by $25$.

And so on for $n=5k+2, n=5k+3, n=5k+4.$

  1. Is this a good way to do this?

The other way that came to my mind would be following:

Let's say that $n^2+3n+6$ is divisible by $25$: $$n^2+3n+6=25k$$ $$n^2+3n+(6-25k)=0$$ If we solve this equation, we get $$n_{1,2}=\frac{-3 \pm \sqrt{5} \sqrt{20k-3}}{2}.$$ But $\sqrt{5}$ is a irrational number, so is $n$ irrational number too. This is contradiction, so it's not divisible by $25$.

  1. Is this a good way to solve this problem?
  • 3
    $\begingroup$ Your second method needs to consider $\sqrt{20k-3}$ too as that might balance the $\sqrt{5}$ and make the overall result rational - in fact it does not, but you have not shown it does not $\endgroup$ – Henry Mar 11 at 9:58

If $25$ divides $n^2+3n+6,$ the later will be divisible by $5$

$n^2+3n+6\equiv n^2-2n+1\pmod5$

So, we need $n\equiv1\pmod5\implies n=1+5m$


  • $\begingroup$ @Dietrich, extra dot $\endgroup$ – lab bhattacharjee Mar 11 at 13:13

Hint: We have $$ n^2+3n+6=(n+4)^2 \bmod 5 $$

Now look at Bill's answer at this duplicate:

$n^2 + 3n +5$ is not divisible by $121$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy