Exercise · Volume 1 · 1.2.5-6
Exercise 1.2.5-6
proved in Lean solution written
| Rating | 17 |
|---|---|
| Markers | recommended |
| Kind | K3, find a value: compute a number, a set or a closed form from the written solution |
| Section | Section 1.2.5 of Volume 1. Companion chapter: Permutations and factorials |
The task
Write as a product of powers of primes, using Legendre's rule, eq. (8).
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
The primes that divide are the primes up to . Eq. (8) gives the exponent of each.
Hint 2
For each prime add until the terms are . Divide the previous term by and drop the remainder.
Solution
Show the solution
The primes up to 20 are . Eq. (8) gives these exponents.
| terms | exponent | |
|---|---|---|
| 2 | 18 | |
| 3 | 8 | |
| 5 | 4 | |
| 7 | 2 | |
| 11 | 1 | |
| 13 | 1 | |
| 17 | 1 | |
| 19 | 1 |
For : , then , then , then , then . For : , then , then . Therefore
Check
Multiply out: , , , , and . The product is . Python's sympy.factorint(math.factorial(20)) returns the same exponents.
Remarks
The number of trailing zeros of is the exponent of , which is . Exercise 1.2.5-12 gives the closed form of each exponent, where is the digit sum of in base . Check: has digit sum , so the exponent of is .
This solution is checked, and a person has not reviewed it yet. The source.
In Lean
proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.
- Problem:
TAOCP.S1_2_5.Ex6.statementaxioms: Classical.choice, Quot.sound, propext - Solution:
TAOCP.S1_2_5.Ex6.solvedaxioms: Classical.choice, Quot.sound, propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.