Proof of $n(n^2+5)$ is divisible by 6 for all integer $n \ge 1$ by mathematical induction

If $f(n)=n(n^2+5)$

$f(k+1)-f(k)$ $=(k+1)\{(k+1)^2+5\}-k(k^2+5)=3k^2+3k+1+5=6\cdot\dfrac{k(k+1)}2+6$ which is divisible by $6$ as $k(k+1)$ is even

$\implies6\mid f(k)\iff6\mid f(k+1)$

If induction is not mandatory,

$$n(n^2+5)=\underbrace{(n-1)n(n+1)}_{\text{Product of Three consecutive integers }}+6n$$


First, show that this is true for $n=1$:

$1(1^2+5)=6$

Second, assume that this is true for $n$:

$n(n^2+5)=6k$

Third, prove that this is true for $n+1$:

$(n+1)((n+1)^2+5)=$

$\color\red{n(n^2+5)}+3n^2+3n+6=$

$\color\red{6k}+3n^2+3n+6=$

$6\left(k+\frac{n(n+1)}{2}+1\right)$


Since either $n$ or $n+1$ is even, $\frac{n(n+1)}{2}$ is integer.

Please note that the assumption is used only in the part marked red.


Hint: let $$f(n)=n(n^2+5),n\geq1$$ then $$f(n+1)=(n+1)(n^2+2n+6)=n^3+2n^2+6n+n^2+2n+6=n^3+3n^2+8n+6=$$ $$=n^3+5n+3n^2+3n+6=3(n^2+n)+6+n(n^2+5)=f(n)+6\left(\frac{n(n+1)}{2}+1\right)$$