I am surprised that people are posting complex proofs of a theorem which is easily provable by high school math. Here is an example.
"if n is prime then n∣(nCr) is pretty easy". right, so we will skip this one. We will just prove the second part, i.e. if n is composite, then $ n \nmid nCr $ for certain r's.
In fact, those r's are all the prime factors of n.
Let r = p where p is a prime factor of n. so n = mp where m is some int.
$ nCp = \frac {n(n-1)(n-2)..(n-p+1)}{p(p-1)(p-2)...1}
= (\frac {n}{p}) \frac{(n-1).(n-2)...(n-p+1)}{(p-1)(p-2)..1} = (\frac{n}{p}) (n-1)C(p-1)
$
since $ (n-1)C(p-1) $ is a binomial coefficient in its own right, it has to be an integer. Let's call it i.
so $ nCp = \frac{n.i}{p} $
Now here is most important observation of this proof. i is formed by dividing a certain numerator by a certain denominator. The numerator is a product of the terms from (n-1) to (n-p+1). None of these terms are divisible by p. Why? because since n is divisible by a prime p, the next smaller integer that can be divided by p can only be n-p. All the terms of the numerator fall between n and n-p excluding the bounds, so none of them is divisible by p, and neither is their product. So we will call i "p-free".
Since i cannot be divided by p, for $nCp$ to be an int, n has to be divided by p. Since n/p = m, $ nCp = \frac{n.i}{p} = m.i$
Now for n to divide $nCp$, $m.p$ has to divide $m.i$. This gives rise to two options.
- m of numerator is divided by m of denominator, and i of numerator is divided by p of denominator.
- m of numerator is divided by p of denominator, and i of numerator is divided by m of denominator.
Option 1 is an impossibilty, because it requires i to be divided by p, and we know that i is "p-free".
Option 2 gives rise to two sub-options. Either m contains a factor p, or it does not. If it does not have a factor p, then clearly $ p \nmid m$. And if it has a factor p, then $ m \nmid i $. (remember, i is p-free). So option 2 is also an impossibility.