Factorials and Prime Factorization

The factorial of a positive integer is the product of all integers from one to that integer. So, the factorial of 5—which is written as 5!—is 1 × 2 × 3 × 4 × 5 = 120.

We use factorials in probability theory when working with combinations and permutations.

Because factorials can be very large numbers (10! = 3,628,800 and 15! = 1,307,674,368,000), it is often more convenient to work with the prime factorization of a factorial than the factorial itself.

Identifying Factors in Factorials

There are several ways we can figure out if 124 is a factor of 9!. We could multiply out 124 and 9!, and then see if 124 divides evenly into 9!.

But we can save ourselves a little work by looking at the prime factorization of 9! instead.

9! = 1 × 2 × 3 × 4 × 5 × 6 × 7 × 8 × 9

9! = (1) × (2) × (3) × (2 × 2) × (5) × (2 × 3) × (7) × (2 × 2 × 2) × (3 × 3)

9! = 27 × 34 × 51 × 71

Since 12 = 22 × 31, then 124 = 28 × 34—which does not fit inside of the prime factorization of 9!. We are one 2 short. This means that 124 is not a factor of 9!.

Finding Powers in Factorials

When working with the prime factorization of a factorial, we don’t always need to know the entire prime factorization. Sometimes all we need to know are the number of some of the prime factors.

To find the greatest factor of 20! that is also a power of 3, we only need to know the number of 3’s in the prime factorization of 20!. The number of the other prime factors is irrelevant.

In this case, the prime factorization of 20! has eight 3’s—one each from the 3, 6, 12, and 15; and two each from the 9 and 18. This means the greatest factor of 20! that is also a power of 3 is 38 = 6561.

Practice Finding Powers in Factorials

greatest factor of ! that is also a power of .

Practice Finding Powers of Composite Numbers in Factorials

number of ’s in the prime factorization of !.

number of ’s in the prime factorization of !.

greatest factor of ! that is also a power of .