# Variation of a previous number theory problem

September 19th, 2009 by ben

Lol, just saw this on the math team forum, was posted by like last last year, but anyways…

In the prime factorization of the expression $100! \cdot 99! \cdot 98! \cdot \ldots \cdot 3! \cdot 2! \cdot 1!$ there is a $7^x$ term. Find x.

So, I’m gonna start out by figuring out how many 7s are in $100!$.

$\dfrac{100}{7} \to \dfrac{14}{7} \to 2$

Therefore there are $14 + 2$ factors of 7 in $100!$. However, it’s going to take a while to figure out everything down all the way to $1!$.

There’s probably a smarter way of doing this, since I’m just dumb, but here is how my feeble mind tackles it.

Smallest 7 is in $7!$, occurs $100 - 7 + 1 = 94$ times.

Largest 7 is 98. This occurs three times, in 98, 99, and 100 factorial.

Therefore, we have the summation:

$\displaystyle\sum^{14}_{i = 1} 101 - 7i$

We also need to count $7^2 = 49$.

Smallest 49 is in $49!$, occurs $100 - 49 + 1 = 52$ times.

The only other 49 is in $98!$ until 100, so it occurs $100 - 98 + 1 = 3$ times.

The solution should be:

$\left( \displaystyle\sum^{14}_{i = 1} 101 - 7i \right) + \left( \displaystyle\sum^{2}_{i = 1} 101 - 49i \right)$

And since we know the second sum already (as it only has two terms anyways and we’ve calculated them to be $52 + 3$ times already), we can replace them.

$\left( \displaystyle\sum^{14}_{i = 1} 101 - 7i \right) + \left( 55 \right)$

Use arithmetic sequence formula or whatever to solve the summation.

$\left( \dfrac{14(3 + 94)}{2} \right) + \left( 55 \right)$

$( 7 \cdot 97 ) + 55 = 679 + 55 = \boxed{734}$

Proof that there are indeed 734 factors of 7 in the number 100! * 99! * ... * 2! * 1!.