Sub topic 2
Factorials and How to Simplify Them
This chapter assumes you can multiply and divide integers, cancel common factors in fractions, and solve a simple quadratic by factoring or testing values. It also assumes you know the multiplication principle from the previous chapter: if one step has a options and a second step has b options, the two steps together have a × b outcomes.
Factorials appear in almost every counting formula on the GRE. Most questions never ask you to compute a large factorial. They ask you to cancel one, so the main skill here is simplifying factorial expressions by hand.
What a factorial is
For a whole number n ≥ 1, n factorial, written n!, is the product of all whole numbers from n down to 1:
n! = n × (n − 1) × (n − 2) × … × 2 × 1
So 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1. Factorials are defined only for non-negative integers. Expressions like (−3)! or 2.5! are not tested on the GRE.
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5,040 |
| 8 | 40,320 |
| 9 | 362,880 |
| 10 | 3,628,800 |
Memorize the values through 6! or 7!. The table also shows how fast factorials grow. 10! is already over three million, and 20! is about 2.4 × 10^18. This growth is why you should simplify before you multiply.
Why factorials count arrangements
Factorials come from the multiplication principle. Suppose you line up 4 distinct books on a shelf. There are 4 choices for the first slot, then 3 books remain for the second slot, then 2, then 1:
4 × 3 × 2 × 1 = 4! = 24
In general, n distinct items can be placed in a row in n! ways. The next chapter builds permutations from this idea, so make sure the picture is clear. Each factor is the number of items still available at that step.
The recursive property
Look at 6! and 5!:
- 6! = 6 × 5 × 4 × 3 × 2 × 1
- 5! = 5 × 4 × 3 × 2 × 1
So 6! = 6 × 5!. In general:
n! = n × (n − 1)!
This one identity drives nearly all simplification. It lets you "peel" factors off a large factorial until it matches a smaller one.
Why 0! equals 1
The recursive property explains the convention. Apply it at n = 1:
1! = 1 × 0!, so 1 = 1 × 0!, so 0! = 1.
It also fits the counting meaning. There is exactly one way to arrange zero items: do nothing. Defining 0! = 0 would break the formulas you will use later, so treat 0! = 1 as a fact to remember.
Simplifying ratios of factorials
The standard technique has two steps:
- Rewrite the larger factorial as a product that ends in the smaller factorial.
- Cancel the smaller factorial from top and bottom.
Example. Simplify 8!/5!.
8! = 8 × 7 × 6 × 5!, so
8!/5! = (8 × 7 × 6 × 5!)/5! = 8 × 7 × 6 = 336
Stop expanding as soon as the smaller factorial appears. You never need to write out all eight factors.
Ratios with variables
The same method works with algebra. Expand only as far as needed.
Example. Simplify (n + 2)!/n!.
(n + 2)! = (n + 2)(n + 1) × n!, so
(n + 2)!/n! = (n + 2)(n + 1)
Example. Find n if (n + 1)!/(n − 1)! = 30.
(n + 1)! = (n + 1)(n)(n − 1)!, so the left side is (n + 1)n. Then:
n(n + 1) = 30
You can see that 5 × 6 = 30, so n = 5. Check: 6!/4! = 6 × 5 = 30. ✓ The quadratic n² + n − 30 = 0 also has the root n = −6, but factorials need a non-negative integer, so reject it.
Ratios with several factorials
Combination formulas, which come later, divide by more than one factorial. Cancel the largest one in the denominator first.
Example. Simplify 7!/(4! × 3!).
7! = 7 × 6 × 5 × 4!, so
7!/(4! × 3!) = (7 × 6 × 5)/(3 × 2 × 1) = 210/6 = 35
Cancel factors before multiplying. Here 6 in the numerator cancels with 3 × 2 in the denominator, leaving 7 × 5 = 35.
Sums and differences: factor, don't expand
You cannot cancel across a plus or minus sign. Instead, factor out the smaller factorial.
Example. Simplify 10! + 9!.
10! = 10 × 9!, so
10! + 9! = 10 × 9! + 1 × 9! = 9!(10 + 1) = 11 × 9!
Example. Simplify (15! − 14!)/14!.
15! = 15 × 14!, so the numerator is 14!(15 − 1) = 14 × 14!. Dividing by 14! leaves 14.
You can check these identities in Python:
import math
# Ratio of factorials: cancel the shared tail
print(math.factorial(8) // math.factorial(5)) # 336
print(8 * 7 * 6) # 336
# Sum: factor out the smaller factorial
print(math.factorial(10) + math.factorial(9)) # 3991680
print(11 * math.factorial(9)) # 3991680
# Several factorials in the denominator
print(math.factorial(7) // (math.factorial(4) * math.factorial(3))) # 35Common errors
Factorials do not follow the usual arithmetic rules. These mistakes appear often on the GRE:
| Wrong | Why it fails | Check |
|---|---|---|
| (a + b)! = a! + b! | The factorial acts on the whole sum | (2 + 3)! = 120, but 2! + 3! = 8 |
| (2n)! = 2 × n! | Doubling n changes every factor | (2 × 3)! = 720, but 2 × 3! = 12 |
| 6!/3! = 2! | Division of arguments does not carry over | 6!/3! = 120, but 2! = 2 |
| a! × b! = (ab)! | Products of factorials are not factorials of products | 2! × 3! = 12, but 6! = 720 |
Divisibility and trailing zeros
Because n! contains every integer from 1 to n, it is divisible by each of them. For example, 10! is divisible by 7, by 8, and by 9. Any question of the form "is n! divisible by k?" for k ≤ n has the answer yes.
A related question asks how many zeros end n!. Each trailing zero comes from a factor of 10, which is 2 × 5. A factorial has far more factors of 2 than of 5, so the count of 5s decides the answer. Count multiples of 5, then of 25, then of 125, and so on:
zeros in n! = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …
For 20!: ⌊20/5⌋ = 4, and 25 > 20, so there are 4 trailing zeros. For 25!: 5 + 1 = 6 zeros, because 25 supplies two factors of 5.
import math
def trailing_zeros(n):
"""Count factors of 5 in n! using floor division."""
count = 0
power = 5
while power <= n:
count += n // power
power *= 5
return count
for n in (10, 20, 25, 100):
digits = str(math.factorial(n))
actual = len(digits) - len(digits.rstrip("0"))
print(n, trailing_zeros(n), actual)
# 10 2 2
# 20 4 4
# 25 6 6
# 100 24 24The formula and the direct count agree in every case.
Estimating and sanity checks
When an answer choice looks suspicious, use size checks:
- n!/(n − 2)! = n(n − 1), which is a bit less than n². So 100!/98! should be near 10,000. The exact value is 100 × 99 = 9,900.
- A ratio such as 12!/10! must be a modest product of two numbers (12 × 11 = 132), not a number in the millions.
- If the larger factorial is on the bottom, the result is a fraction. For example, 5!/8! = 1/(8 × 7 × 6) = 1/336.
Where factorials go next
The simplification skills here are the working part of later chapters. A permutation formula is a ratio of factorials, and a combination formula adds another factorial to the denominator. If you can reduce 7!/(4! × 3!) to 35 in a few lines, those formulas will read as short products.
Exercise
Simplify 12!/(10! × 2!) without a calculator.
Show answer
Expand 12! = 12 × 11 × 10!, and cancel 10!. This leaves (12 × 11)/2! = 132/2 = 66.
Exercise
If n!/(n − 2)! = 56, find n.
Show answer
n! = n(n − 1)(n − 2)!, so the ratio is n(n − 1) = 56. Since 8 × 7 = 56, n = 8. The other root of n² − n − 56 = 0 is −7, which is not allowed. Check: 8!/6! = 8 × 7 = 56.
Exercise
Simplify (15! + 14!)/14! and explain why you cannot cancel 14! term by term.
Show answer
Factor the numerator: 15! + 14! = 14!(15 + 1) = 16 × 14!. Dividing by 14! gives 16. Cancelling is valid only when 14! is a factor of the whole numerator, which requires factoring it out of the sum first. Cancelling just the second term would give 15!/14! + 1 = 16 by luck here, but the general method is to factor first.
Exercise
How many trailing zeros does 50! have?
Show answer
Count factors of 5: ⌊50/5⌋ + ⌊50/25⌋ = 10 + 2 = 12. There are plenty of factors of 2, so 50! ends in 12 zeros.