TITLE: How to prove that $\frac{1000!}{(500!)^2}$ is not divisible by 7?
QUESTION [8 upvotes]: How to prove that 
  $$\frac{1000!}{(500!)^2}$$
  is not divisible by 7?

I reduced the above fraction to:
$$\frac{\prod_{k=501}^{1000}k}{500!} $$
But I don't know how to proceed. Please help.

REPLY [7 votes]: It is a general formula that the number of times a prime $p$ occurs in the prime factorisation of $n!$ is given by
$$
\left[\frac{n}{p}\right] + \left[\frac{n}{p^2}\right] + \left[\frac{n}{p^3}\right] + \cdots
$$
where $[x]$ denotes the greatest integer $≤x$.
In $1000!$ you'd have
$$
\left[\frac{1000}{7}\right] + \left[\frac{1000}{7^2}\right] + \left[\frac{1000}{7^3}\right] + \cdots = 164
$$
$7$'s, and in $500!$ you have
$$
\left[\frac{500}{7}\right] + \left[\frac{500}{7^2}\right] + \left[\frac{500}{7^3}\right] + \cdots = 82
$$
$7$'s. So you'll have a total of $164$ 7's in $(500!)^2$.
The rest follows.

REPLY [2 votes]: In $\{1,\dots, 500\}$, there are 71 multiples of 7, 10 multiples of $7^2$ and one multiple of $7^3$.
How many multiples of $7$, $7^2$, $7^3$ do you have in $\{501,\dots, 1000\}$? Same amount.