# Largest number that divides $n^2(n^2 - 1)(n^2 - n - 2)$ for all $n$

Obtain the greatest natural that divides $n^2(n^2 - 1)(n^2 - n - 2)$ for all natural numbers $n$.

What should be the approach in these type of questions?

Should I equate with prime factorization $2^a 3^b 5^c \cdots$ etc?

-

\begin{align} f(n) & = n^2(n^2-1)(n^2-n-2)\\ & = n^2(n+1)(n-1)(n+1)(n-2)\\ & = n^2(n+1)^2(n-1)(n-2) \end{align} $n=3$ gives us $9 \times 16 \times 2 = 288$. So the natural number dividing $n^2(n+1)^2(n-1)(n-2)$ for all $n$ should be a divisor of $288$.

Also, note that $24$ has to divide $n^2(n+1)^2(n-1)(n-2)$ since $24$ divides $(n-2)(n-1)n(n+1)$ since it is a product of $4$ consecutive integers.

Further, $2$ divides $n(n+1)$. Hence, we know that at-least $48$ divides $f(n)$. Hence, the desired number should be a multiple of $48$ and must divide $288$.

Can you finish it from here by looking at $f(n)$ for couple of other values? Move the mouse over the gray area for the answer.

Since the largest number must be a multiple of $48$ and must divide $288$. The possible options are $$\{48, 96, 144, 288\}$$ $$\text{f(4) = 2400. And 144,288 doesn't divide 2400. Hence, the largest number cannot be 144 or 288.}$$ $$\text{f(5) = 10,800. And 96 doesn't divide 10,800. Hence, the largest number cannot be 96. Hence, the largest number is 48.}$$

-
What you did in this gray area (Move the mouse...) is great. How do you do that? :) – Babak S. Jul 1 '12 at 20:23
@BabakSorouh You need to do >! before the text you want to hide. – user17762 Jul 1 '12 at 20:28
Thanks for it. It is like a magic here :-) – Babak S. Jul 1 '12 at 20:40

By below, $\,2^{4}\!\cdot\! 3\,$ is the largest integer dividing all $\rm\:f(n).\:$ No higher power of $2$ or $3$ divides all $\rm\,f(n)\,$ by the value of $\rm\,f(13),$ and no prime $\rm\,p\ge 5\,$ divides all $\rm\,f(n)\,$ by the value of $\rm\,f(p\!+\!3).$ $\quad$ $$\quad\begin{eqnarray}\rm 2^4\cdot 3\:|\: f(n) &=&\rm\ \ \color{#C00}{(n\!+\!1)\ n}\ \ (n\!+\!1)n(n\!-\!1)(n\!-\!2)\\ &=&\rm\ \color{#C00}{2{n+1\choose 2}}\, 24{n+1\choose 4}\\ \rm 2^{ 5},\,3^2\nmid\, f(13) &=&\rm\ 14^{\!\ 2}\ 13^{\!\ 2}\ 12\ \ 11 =\, 2^{ 4}\ 3\,\cdots\\ \rm prime\,\ p\nmid f(p\!+\!3) &=&\ \rm (p\!+\!4)^2 (p\!+\!3)^2 (p\!+\!2) (p\!+\!1)\ \ if\ \ p\ge 5 \end{eqnarray}$$

-
I think readers could use a little more words, Bill. Just a constructive criticism. – Pedro Tamaroff Jul 1 '12 at 22:56
Thank you, Bill. – Pedro Tamaroff Jul 1 '12 at 23:11

Factor as $(n-2)(n-1)n^2(n+1)^2$. It is easy to see that no prime greater than $3$ must divide this product. (For if $p$ is a prime greater than $3$, let $n-3=p$.)

Our product is obviously divisible by $3$. By choosing $n-1=3$, we can make sure that $3^2$ does not divide our product.

To minimize the power of $2$ that divides our product, we make $n-2$ (respectively, $n-1$) divisible by $4$ but not by $8$. Then $n^2$ (respectively, $(n+1)^2$) is divisible by $4$ but not by $8$. Thus $2^4$ must divide our product, and a higher power of $2$ need not.

We conclude that the largest positive integer that always divides our product is $(3^1)(2^4)$.

-