Prove that $(z^3-z)(z+2)$ is divisible by $12$ for all integers $z$

I am a student and this question is part of my homework.

May you tell me if my proof is correct?

Prove that $(z^3-z)(z+2)$ is divisible by $12$ for all integers $z$.

$(z^3-z)(z+2)=z(z^2-1)(z+2)=z(z-1)(z+1)(z+2)=(z-1)(z)(z+1)(z+2)$

$(z-1)(z)(z+1)(z+2)$ means the product of $4$ consecutive numbers.

Any set of $4$ consecutive numbers has $2$ even numbers, then $(z-1)(z)(z+1)(z+2)$ is divisible by $4$.

Any set of $4$ consecutive number has at least one number that is multiple of $3$, then $(z-1)(z)(z+1)(z+2)$ is divisible by 3.

Therefore $(z-1)(z)(z+1)(z+2)$ is divisible by $12$. Q.E.D.

• You should use the term "integer" instead of number. And you can actually prove something stonger - that it is divisible by $24$. Your proof for $12$ looks correct, though. – Thomas Andrews Feb 12 '15 at 3:42
• @ThomasAndrews Thanks for show me my mistake. Thanks! – Beginner Feb 12 '15 at 3:46
• @ThomasAndrews How can you prove that is divisible by 24? Thanks! – Beginner Feb 12 '15 at 3:59
• You can prove it by first proving that the product of three consecutive numbers is divisible by $6$, then prove it by induction on $x$. (That only proves it for $x\geq1$, but it follows easily that it is also true for $x\leq 0$.) – Thomas Andrews Feb 12 '15 at 4:07
• @Beginner. See math.stackexchange.com/questions/12067/… – lab bhattacharjee Feb 12 '15 at 4:40

That's correct. Alternatively it is divisible by $\,24\,$ by integrality of binomial coefficients
$$\,(z+2)(z+1)z(z-1)\, =\, 4!\ \dfrac{(z+2)(z+1)z(z-1)}{4!}\, =\, 24{ {z+2\choose 4}}\qquad\qquad$$
Similarly $\,n!\,$ divides the product of $\,n\,$ consecutive naturals.
• @Beginner $${z+2 \choose 4} \,=\, \frac{(z+2)!}{4!\,(z-2)!}\, =\, \frac{(z+2)(z+1)z(z-1)}{4!}$$ – Bill Dubuque Feb 12 '15 at 15:05