5

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.

Bill Dubuque
  • 272,048
  • 10
    Let $f(n)=n(n^2-1)(5n+2)$. Note that $\gcd(f(2),f(3))=\gcd(72,408)=24$ so the number you seek could not be larger than $24$. Your proof showing that $24$ divides $f(n)$ is fine. These together imply the number you seek is $24$ itself. – JMoravitz Jun 28 '21 at 15:32
  • @lonestudent I think you mean $72 \mid n(n^2-1)(5n+2)$ for $n$ even, which is not true. When $n \equiv 0,1 \pmod 3, 9 \nmid n(n^2-1)(5n+2)$. – arbashn Jun 28 '21 at 16:15
  • @arbashn I think I realized the mistake 2 seconds before you :) I saw your comment after I deleted it. Thanks. Yes, you are right. – lone student Jun 28 '21 at 16:18
  • 1
    You don't even have to calculate $f(2)$ to know that no prime $p \gt 3$ always divides $f(n)$. $f(n)$ has degree $4$, which means at there are at most four solutions $\pmod p$ which is less than $p \geq 5$. – arbashn Jun 28 '21 at 16:20
  • 2
    $f(n) = 120\binom{n}{4} + 192\binom{n}{3} + 72\binom{n}{2}$ which strongly suggests the answer is probably $\gcd(120,192,72) = 24$. – Daniel Schepler Jun 28 '21 at 16:42
  • It might be worth noting that if $n= 2$ we get $n(n^2-1)(5n + 2) = 72=2^3\times 3^2$ and so we don't have be divisible by anything that doesn't divide $72$. We do know it must be divisible by $3$. And if $n$ is odd $n-1,n+1$ are even and if $b$ us even $5n+2$ is even so $n$ is divisible by $4$. It's a matter of showing whether it must be divisible by $8$ or by $9$. If $n$ is odd then one of $n\pm 1$ is divisible by $4$. And if $n$ is even be not divisible by $4$ then $n=4k+2$ and $5(4k+2)+2$ is divisible by $4$ so yes is must be divisible by $8$. As for $9$... if $n=3$ then..... – fleablood Jun 29 '21 at 02:57
  • @JMoravitz More simply, by general principles, we need only compute the gcd of $,f_n,$ for $,n = 0,\pm1,\pm2.,$ Since $,f_0=0=f_{\pm1},$ this gcd $= (f_{-2},f_2) = (48,24)= 24,,$ as explained in my answer. – Bill Dubuque Feb 29 '24 at 19:32

4 Answers4

5

We prove that the greatest common divisor of all $f_n$ is the gcd of the first $5$ values. Write $\,\Delta_n\,$ for the first difference operator $\,\Delta_n\:\! g(n) = g(n\!+\!1)-g(n).\,$ This reduces the degree of polynomial $\,g(n)\,$ since $\,g(n\!+\!1)\,$ and $\,g(n)\,$ have the same lead coef so they cancel out when subtracted. In the OP we have $ \,f_n = p(n)\,$ is a polynomial in $n$ of degree $\:\!4$ with integer coef's, so repeatedly applying $\Delta$ to both sides $\,f_n = p(n)\,$ we eventually reach the zero polynomial on the RHS, so then the LHS yields a $\rm\color{#c00}{monic}\ (lead\ coef =\color{#c00}{\bf 1})$ recurrence for $\,f_n\,$ of order at most $5$, with integer coef's, i.e.

$$\color{#c00}{\bf 1}\cdot 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$$

So by induction all $\,f_{k}\,$ have form $\,c_4 f_{4} + \cdots + c_1 f_{1} + c_0 f_0\,$ for $\,c_i\in\Bbb Z,\,$ so by (strong) induction

$\qquad\qquad\ \ \ d\mid f_0,f_1,f_2,\ldots \!\iff d\mid f_0,f_1,f_2,f_3,f_4$

therefore $\ \gcd(f_0,f_1,f_2,\ldots)\, =\, \gcd(f_0,f_1,f_2,f_3,f_4)$

therefore $\,\gcd(f_0,f_1,f_2,f_3,f_4)\,$ 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$.

If further (as in OP) $\,\color{#c00}{a_0 = \pm1}\,$ then running the recurrence in reverse it remains monic hence the argument reverses, yielding that the gcd of any $5$ consecutive $f_k$ is constant. So a simple choice in the OP is to compute the gcd of $\,f_n\,$ for $\,n = -2,-1,0,1,2,\,$ i.e. $(48, 0, 0, 0, 72) = (48, 24) = 24$.

Bill Dubuque
  • 272,048
  • 1
    Note we don't need to compute the recurrence - we only need its existence. – Bill Dubuque Jun 28 '21 at 22:52
  • Your answer looks nice (+) and I want to understand but I can't understand anything. Could you please direct me to the more basic method? Eg. A similar question with more context ..I know Euclid like this $\gcd (a,b)=\gcd(a±b,b)$ – lone student Jun 28 '21 at 23:01
  • 2
    @lone The mod reduction step in the Euclidean algorithm is $,\gcd(a,b) = \gcd(a,b\bmod a),,$ i.e. we can reduce a gcd argument mod any other argument. So in our gcd we can reduce all later arguments mod the first $5$ args, which kills (reduces to $0$) all $f_k,\ k\ge 5$ since they are integral linear combinations of the first $5$ args. – Bill Dubuque Jun 28 '21 at 23:10
  • 1
    @lone I clarified it more (there was a garbled edit which likely led to confusion), and also added some links to (simpler) examples. – Bill Dubuque Jun 28 '21 at 23:59
  • Thank you for more context. Now, I find your answer more instructive.. – lone student Jun 29 '21 at 00:15
  • @BillDubuque although the existence of such a recurrence appeals to me intuitively, where can I find proof of the same? I don't understand how "iteratively taking differences" works. Thanks! – D S Feb 29 '24 at 17:51
  • @DS Repeatedly apply the first difference operator $,\Delta,$ (where $,\Delta g(n) = g(n+1)-g(n))$ to both sides of $,f_n = p(n).,$ Since $\Delta$ reduces the degree of any polynomial $,p(n),$ the RHS eventually becomes $0$, e.g. we get $,f_{n+1}-f_n = p(n!+!1)-p(n),,$ of degree $\le \deg p - 1.,$ Apply $\Delta$ to both sides of that yields $,f_{n+2}-2f_{n+1}+f_n = p(n!+!2)-2p(n!+!1)+p(n)$ of degree $\le \deg p - 2,,$ etc. $\ \ $ – Bill Dubuque Feb 29 '24 at 18:40
  • @BillDubuque thanks, it is clear now – D S Feb 29 '24 at 18:47
2

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.

lone student
  • 14,709
0

Alternatively.

Let $p$ be an odd prime. If $p|n$ but $p^2 \not \mid n$ then we have $p\not \mid n-1, n-2, 5n + 2$ so we need never have any odd prime $p^2|n(n^2-1)(5n+2)$.

If $p=3$ we must have one of $n-1, n, n+1$ be divisible by $3$ so we must have $3|n(n^2-1)(5n+2)$ but we need not have $3^2|n(n^2-1)(5n+2)$.

If $p=5$ we will not have $5|5n+2$ and as we have $5$ options for $n \pmod 5$ we can avoid $n \equiv 0, 1, 4$ (by having $n\equiv 2,3\pmod 5$ and thus have $n, n+1, n-1\not \equiv 0\pmod 5$ and so $5\not \mid n(n^2-1)(5n+2)$.

If $p > 5$ we can have more than $4$ options for $n\pmod 5$ and so we can have $n \not \equiv 0, 1,-1, -2\cdot 5^{-1} \pmod p$. ANd that way we can avoid $p|n(n^2-1)(5n+2)$.

So no odd prime other than $3$ need divide $n(n^2-1)(5n+2)$ and $3^2$ need not divide it.

And as what power of $2$ must divide $n(n^2-1)(5n+2)$.

One of $n,n+1$ must be even so $2$ must divide. If $n$ is odd then $n-1$ and $n+1$ is even and so $4$ must divide. But one of $n-1$ or $n+1$ must be divisible by $4$ so $8$ must divide.

If $n$ is even then $5n+2$ is even so $4$ must divide. If $n$ is not divisible by $4$ then $n = 4k + 2$ for some $k$ and $5n+2 = 20k + 12$ is divisible by $4$ and so $8$ must divide. And if $n$ is divisible by $4$ then as $5n + 2$ is even $8$ must divide.

That exhausts all cases so $8$ must divide $n(n^2-1)(5n+2)$.

Now no higher power of $2$ must divide as we can chose $n$ odd so that $4$ but not $8$ divides one of $n\pm 1$. For example if $n = 5$ and so $n+1 = 6$ and $n-1 =4$ and only $8$ need divide. Or we can choose an even $k$ where $n = 4k + 2$ and $5n+2 = 20k + 12= 4(5k + 3)$ is divisible by $4$ but not by $8$.

So we must have $3$ and $8$ divide $n(n^2-1)(5n+2)$ but no other prime or higher power of $3$ or higher power of $2$ need divide.

SO $24$ is the largest number that must divide.

fleablood
  • 124,253
0

Let $I_n=n(n^2-1)(5n+2)$. Then $I_n=(n-1)n(n+1)(n+2)\pmod4$ therefore $8|I_n$ and $I_n=2(n-1)n(n+1)^2\pmod3$ therefore $3|I_n.$

Since $I_2=24\times3$ and $I_3=24\times17$, $\gcd I_n=24.$

Bob Dobbs
  • 10,988