[Math] Which is the biggest integer that divides all integers that are the product of three consecutive odd numbers

arithmeticelementary-number-theoryproblem solving

I read this problem from a high-school-math-problems-calendar, and I'm solving them in my spare time just for the fun of it (what in math is not about the fun? =) ), but this little one it's been hard for me (maybe is a silly problem for mathematicians). Again, this is the problem statement:

Which is the biggest integer that divides all integers that are the
product of three consecutive odd numbers?

So far, I did this:
$$
(m – 1)\cdot(m+1)\cdot(m + 3)\tag{1}
$$
where $m = 2k$, expanding:
$$
m^3+3m^2-m-3=m(m^2-1)+3(m^2-1)
$$
(Of course, if I keep simplifying the equation I'll get (1) again). The right term is divisible by $3$, but the left term is divisible by $2$, don't know what else to do… Any ideas?

I know that the answer is $3$ because I made a little program that test the mod $3$ of the product of first $1000$ consequtive odd numbers and it prints $0$ for all of them, but don't know how to prove it

 python -c "for n in xrange(1, 1000, 2): print (n * (n + 2) * (n + 4)) % 3;"

Any help would be appreciated

(I'd appreciate if somebody edit/adds the correct tags for this question)

Best Answer

$-3=(-1)\cdot1\cdot3$ is the product of three consecutive odd integers, so any integer that divides all such products must divide $-3$. The divisors of $-3$ are $-1,1,-3$, and $3$, so these are the only candidates. To finish the proof, we need only show that $3$ always does divide the product of three consecutive odd integers.

Let $n$ be any odd integer, and consider the product $m=n(n+2)(n+4)$. There are three possibilities.

  • If $n$ is a multiple of $3$, then certainly so is $m$.
  • If $n=3k+1$ for some integer $k$, then $n+2=3k+3=3(k+1)$ is a multiple of $3$, and therefore so is $m$.
  • If $n=3k+2$ for some integer $k$, then $n+4=3k+6=3(k+2)$ is a multiple of $3$, and therefore so is $m$.

In every case, therefore, $m$ is a multiple of $3$, and $3$ is therefore the largest integer that divides every product of three consecutive odd integers.