# Math Help - Factorials versus triangle numbers

1. ## Factorials versus triangle numbers

I was checking out the factorials versus triangle numbers and I ran across something that struck me as quite interesting.

Let's take 1! and divide it by the first triangle number, 1, which equals 1. Then I moved on to 2! and divided it by 3 (the second triangle number) which isn't evenly divided. Then I took 3! and divided it by 6 (the third triangle number) which equals 1. Then I took 4! and divided it by 10 which doesn't evenly divide. Next I tried dividing 5! by 15 which does evenly divide (equalling 8). Moving on to 6! and dividing it by 21 doesn't go evenly.

So far nothing surprising at this stage. However when I divided the next five factorials by their corresponding triangle numbers, there were no remainders! (the next factorial, 12!, does leave a remainder, but 13! doesn't and I stop here as this is as high as my calculator goes).

One would think that this interesting event would be on the internet somewheres or in a book, but I never ran across this before. This makes me wonder what the longest string would be by going into higher numbers (or at least what the longest string that's known).

2. Originally Posted by wonderboy1953
I was checking out the factorials versus triangle numbers and I ran across something that struck me as quite interesting.

Let's take 1! and divide it by the first triangle number, 1, which equals 1. Then I moved on to 2! and divided it by 3 (the second triangle number) which isn't evenly divided. Then I took 3! and divided it by 6 (the third triangle number) which equals 1. Then I took 4! and divided it by 10 which doesn't evenly divide. Next I tried dividing 5! by 15 which does evenly divide (equalling 8). Moving on to 6! and dividing it by 21 doesn't go evenly.

So far nothing surprising at this stage. However when I divided the next five factorials by their corresponding triangle numbers, there were no remainders! (the next factorial, 12!, does leave a remainder, but 13! doesn't and I stop here as this is as high as my calculator goes).

One would think that this interesting event would be on the internet somewheres or in a book, but I never ran across this before. This makes me wonder what the longest string would be by going into higher numbers (or at least what the longest string that's known).
The n'th triangular number is $\tfrac12n(n+1)$. The necessary and sufficient condition for n! to be divisible by this number is that n+1 should not be prime (apart from the exceptional case n=1).

That makes me think that there is somthing missing from the above list, because 11 is prime, and therefore 10! should not be divisible by the 10th triangular number (and in fact it isn't: 10! = 3628800, the 10th triangular number is 55, and 3628800 divided by 55 leaves a nonzero remainder).

3. ## Opalg

Thanks for catching that mistake. So through 13, you can have a string of three (not five as I originally thought), still I find it interesting for 1 through 13, 8 are cleanly divisible and 5 aren't (I tried shifting the factorials by starting off with 0! so for 0! through 13!, the situation reverses whereby 10 divisions leave remainders while 4 are clean - two in a row - which is what I would have expected for 1! to 13!).

So my question still stands. Is there a longer string than three clean divisions (no remainders)? What is the longest string known? Can it be proven that the longest string can't exceed a certain number? (has this been explored before?)

4. Hello, wonderboy1953!

A fascinating exploration . . . Thank you for sharing it.

I cranked out several cases and noted the pattern that Opalg found.

I listed the cases in which the remainder was not zero.

. . $\begin{array}{c|cccccc}
n &&& \dfrac{n!}{T_n} \\ \\[-3mm] \hline \\[-3mm]
2 & \dfrac{2!}{T_2} &=& \dfrac{2!}{3}&=& \dfrac{2!}{1\cdot3}\\ \\[-3mm]
4 & \dfrac{4}{T_4} &=& \dfrac{4!}{10} &=& \dfrac{4!}{2\cdot5}\\ \\[-3mm]
6 & \dfrac{6}{T_6} &=& \dfrac{6!}{21} &=& \dfrac{6!}{3\cdot7}\\ \\[-3mm]
10 & \dfrac{10!}{T_{10}} &=& \dfrac{10!}{55} &=& \dfrac{10!}{5\cdot11}\\ \\[-3mm]
12 & \dfrac{12!}{T_{12}} &=& \dfrac{12!}{78} &=& \dfrac{12!}{6\cdot13}\\ \\[-3mm]
16 & \dfrac{16!}{T_{16}} &=& \dfrac{16!}{136} &=& \dfrac{16!}{8\cdot17}\\ \\[-3mm]
\vdots & \vdots && \vdots && \vdots \end{array}$

I saw that, in each case, the denominator contained a prime factor $p$
. . and the numerator was $(p-1)!$

A little Thought cleared this up.

Since $T_n \:=\:\frac{n(n+1)}{2}$, the fraction is: . $\dfrac{n!}{\frac{n(n+1)}{2}}\:=\:\dfrac{2(n-1)!}{n+1}$

Hence, if $(n+1)$ is prime, then the division has a nonzero remainder.

5. Originally Posted by wonderboy1953
Is there a longer string than three clean divisions (no remainders)? What is the longest string known? Can it be proven that the longest string can't exceed a certain number? (has this been explored before?)
Because of the connection between "clean divisons" and prime numbers, a string of clean divisions corresponds to a string of composite numbers, in other words a prime gap. Since prime gaps can be arbitrarily long, you can have arbitrarily long strings of clean divisions. For example, there will be a string of 13 clean divisions going from n=113 to n=125 inclusive.