Exercise · Volume 1 · 1.2.5-11
Exercise 1.2.5-11
proved in Lean solution written
| Rating | M15 |
|---|---|
| Markers | M (mathematical) |
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 1.2.5 of Volume 1. Companion chapter: Permutations and factorials |
The task
Let have ones in its binary form. Show that the exponent of in is exactly .
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
Use Legendre's rule, eq. (8), with .
Hint 2
Write . Compute by dividing each power of two separately and dropping the fractions.
Solution
Show the solution
By eq. (8) the exponent of in is . For each , the terms with are multiples of , and the terms with add up to less than , because they are distinct powers with and their sum is at most . Therefore
Sum over and exchange the order of summation:
So divides and does not, because is the largest exponent.
Check
has , and with odd. So the exponent is . For , and . Python checks all .
Remarks
Exercise 1.2.5-12 is the same result for any prime in place of . The number is minus the number of ones in the binary form. In particular is odd only for , and has an exponent of equal to the number of ones in .
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.Ex11.statementaxioms: Quot.sound, propext - Solution:
TAOCP.S1_2_5.Ex11.solvedaxioms: Classical.choice, Quot.sound, propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.