Find the largest number that $ n(n^2-1)(5n+2) $ is always divisible by?

My Solution:

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

  1. This number is divisible by 6 (as at least one of 2 consecutive integers is divisible by 2 and one of 3 consecutive integers is divisible by 3.

  2. $ 5n+2 \equiv 5n \equiv n \mod 2 $ then $n$ and $5n+2$ have the same pairness and at least one of $n+1$ and $5n+2$ is divisible by 2.

  3. $ n \equiv 5n \equiv 5n+4 \mod 4 \to $

    if $ 2\ | \ n+1 \to n - 1 $ or $ n + 1 $ is divisible by 4

    if $ 2\ | \ 5n+2 \to n $ or $ 5n + 2 $ is divisible by 4

The expression is divisible by 6 and has 2 even integers and one of them is divisible by 4 $\to$ is divible by 24.


Hint: since $f_n$ is a polynomial in $n$ of degree $\:\!4$ with integer coef's, iteratively taking differences $\,f_{n+1}-f_n\,$ shows it satisfies a monic recurrence of order $5$ with integer coef's, i.e.

$$f_{n+5} = a_4 f_{n+4} + \cdots + a_1 f_{n+1} + a_0 f_n,\,\ {\rm for\ some}\ a_i\in \Bbb Z\quad$$

By induction all $\,f_{k}\,$ have form $\,c_4 f_{4} + \cdots + c_1 f_{1} + c_0 f_0\,$ for some $\,c_i\in\Bbb Z,\,$ so by $\rm\color{#c00}{Euclid}$

$$\begin{align} &\gcd(\color{#90f}{f_0},\color{#0a0}{f_1},f_2,f_3,\color{#c00}{f_4},\ \ldots,\ c_4 \color{#c00}{f_4} + \cdots + c_1 \color{#0a0}{f_1} + c_0 \color{#90f}{f_0},\ \ldots)\\[.3em] =\ & \gcd(f_0,f_1,f_2,f_3,f_4),\,\ {\rm by}\ \ c_4\color{#c00}{f_4}\equiv 0\!\!\!\!\pmod{\!\!\color{#c00}{f_4}},\rm\ etc \end{align}$$

is the largest integer dividing all $\,f_k$.

Note $ $ See the Remark in this answer for the same method applied to $\,f_n = a^n+b^n+c^n + d^n$ and see also here for a simpler case of a second order recurrence, for $\,f_n = 5^3\, 25^n + 3^3\, 6^n$.


Your proof seems correct to all of us, as it appears in the comments.


I would consider applying a method like this:

$$\begin{align}f(n)&=n(n^2-1)(5n+2) \\&=n(n^2-1)(4n+n+2)\\ &=\underbrace{4n^2(n-1)(n+1)}_{\equiv ~0~(\text{mod}~~ 48)} \\ &+\underbrace{(n-1)n(n+1)(n+2)}_{\equiv ~0~(\text{mod}~ 24)}\end{align}$$

If $n=3$, then $5n+2$ is prime and if the largest number to which the function is always divided was greater than $24$, the next factor must be $17$. But, $f(2)$ is not divisible by $17.$ Therefore, the largest number should only be $24$.


Explanations:

  • $24|(n-1)n(n+1)(n+2)$

Because, the product of $4$ consecutive positive integers are always divisible by $24$.

Applying $$n=8k±m, ~0≤m≤4, m\in\mathbb Z$$ shows that, $8|(n-1)n(n+1)(n+2)$ and we already know that, $6|(n-1)n(n+1)(n+2)$. This means $24|(n-1)n(n+1)(n+2)$.

  • $48|4n^2(n-1)(n+1)$

Because, $48|4n^2(n-1)(n+1)=12|(n-1)n^2(n+1)$

Observing at the cases where $n$ is odd or even completes the proof.