# proof that $n^4+22n^3+71n^2+218n+384$ is divisible by $24$

Let $n$ be a positive integer number.

How do we show that the irreducible polynomial $n^4+22n^3+71n^2+218n+384$ is divisible by $24$ for all $n$?

$$P \equiv n^4-2n^3-n^2+2n \equiv (n-2)\cdot(n-1)\cdot n\cdot(n+1)\equiv 0\mod 24$$ The last one is because four consecutive numbers must include one number that is divisible by $4$, another number that is divisible by $2$, and one number that is divisible by $3$.

• Nice answer! +1 Jul 13, 2017 at 5:47
• Thank you for the compliments, I think this is a standard way of approaching this type of problem. Jul 13, 2017 at 5:48
• Yes, of course, but I missed it. Jul 13, 2017 at 5:55

With a bit of work (if you're not smart enough to come up with something as smart as Lazy Lee's answer you can't be lazy) you can prove this by induction in steps. Call your polynomial $P(n)$ if $P(0)$ and $P(n+1)-P(n)$ are both divisible by $24$ you're done. To prove that $Q(n) = P(n+1)-P(n)$ is divisible by $24$ you use the same approach and so on.

We have:

$$Q(n) = P(n+1)-P(n) = (4n^3 + 6n^2 + 4n + 1) + 22(3n^2 + 3n + 1) + 71(2n + 1) + 218\\ = 4n^3 + 72n^2 + 212n + 312$$ $$R(n) = Q(n+1)-Q(n) = 4(3n^2 + 3n + 1) + 72(2n + 1) + 212\\ = 12n^2 + 156n + 288$$ $$S(n) = R(n+1)-R(n) = 12(2n+1) + 156\\ = 24n + 168$$

Here we see that $S(n)$ is divisible by $24$ and also that $P(0)$, $R(0)$ and $Q(0)$ are and the rest follows by induction (note that we have the prerequisite of bidirectional induction since for example $24\mid P(n) \leftrightarrow 24\mid P(n+1)$).

Because $$n^4+22n^3+71n^2+218n+384=n(n+1)(n+2)(n+3)+16n^3+60n^2+212n+384=$$ $$=n(n+1)(n+2)(n+3)+384+16(n^3-n)+60n^2+228n=$$ $$=n(n+1)(n+2)(n+3)+384+16(n-1)n(n+1)+60n(n+1)+168n.$$

Another way to do it is to note:

$n^4+22n^3+71n^2+218n+384 \equiv$

$n^4 - 2n^3 - n^2 + 2n \mod 8$.

If $n \equiv 0, \pm 1, \pm 2, \pm3, 4 \mod 8$ then $n^4 - 2n^3 - n^2 + 2n\equiv$

$0, 1\mp 2 - 1 \pm 1, 16 \mp 16 -4 \pm 4, 81 \mp 54 - 9 \pm 6, 4^4 \mp 2*4^3 - 16 + 8 \equiv$

$0, 0, 72 \mp 48, 0 \equiv 0 \mod 8$.

So $8$ divides $n^4+22n^3+71n^2+218n+384$

and $n^4+22n^3+71n^2+218n+384 \equiv$

$n^4 + n^3 - n^2 -n \mod 3$

If $n \equiv 0, \pm 1 \mod 3$ then $n^4 + n^3 - n^2 - n \equiv 0, 1 \pm 1 -1 \mp 1 \equiv 0 \mod 3$.

So $3$ divides $n^4+22n^3+71n^2+218n+384$.

So $3*8 =24$ divides $n^4+22n^3+71n^2+218n+384$.