STAGE NT 2.1 · 8 PRACTICE PROBLEMS · 2 NEW-CONTEXT APPLICATIONS
Prime Powers in Factorials
Useful preparation: Summing Divisors
Goal: Understand and apply prime powers in factorials.
Before you begin: Summing Divisors
Understand the idea
A factorial contains one factor p from every multiple of p, an additional one from every multiple of p², and so on. Counting these layers captures numbers with repeated prime factors.
Choose and carry out a method
Add floor(n/p), floor(n/p²), and subsequent terms until they become zero. For trailing decimal zeros, compare the exponents of two and five.
Check the reasoning
A multiple of p² must contribute at least twice. Counting only multiples of p misses this extra contribution.
What is the exponent of 5 in the prime factorization of 17!?
- Count a contribution for each multiple of 5, another for each multiple of 25, and so on.
- Add floor(17/5)+floor(17/25)+floor(17/125)+… .
- The total is 3. For trailing zeros, factors of 2 are more plentiful, so factors of 5 determine the count.
3
What is the exponent of 5 in the prime factorization of 22!?
- Count a contribution for each multiple of 5, another for each multiple of 25, and so on.
- Add floor(22/5)+floor(22/25)+floor(22/125)+… .
- The total is 4. For trailing zeros, factors of 2 are more plentiful, so factors of 5 determine the count.
4
Common pitfalls
Possible mix-up: Every multiple of p contributes exactly once.
Multiples of higher powers contribute additional factors.
Possible mix-up: A correct numerical answer alone explains the method.
State the governing relationship and check the conditions described above.
Explain it to yourself
Why do factors of five control the trailing zeros of a factorial?
Preview the eight practice prompts
- What is the exponent of 5 in the prime factorization of 32!?
- What is the exponent of 5 in the prime factorization of 37!?
- What is the exponent of 5 in the prime factorization of 42!?
- What is the exponent of 5 in the prime factorization of 47!?
- What is the exponent of 5 in the prime factorization of 52!?
- What is the exponent of 5 in the prime factorization of 57!?
- The product 1·2·…·62 is written in decimal notation. How many trailing zeros does it have? New context
- The product 1·2·…·67 is written in decimal notation. How many trailing zeros does it have? New context

