Exercise · Volume 1 · 1.2.3-20
Exercise 1.2.3-20
proved in Lean solution written
| Rating | 25 |
|---|---|
| Markers | recommended |
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 1.2.3 of Volume 1. Companion chapter: Sums and products |
The task
(a) Write the pattern , , with a sum. (b) Generalize to base . (c) Prove the formula of (b).
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 number with the digits in base has the digit at the place , for .
Hint 2
In base the factor becomes and the number becomes .
Hint 3
For the proof, multiply the sum by and subtract it, with a shift of the index, as for Eq. (14).
Solution
Show the solution
(a) The number (for ) is , since the digit at the place is . The number with ones is . So the pattern is
(b) In base the same digits give This is an identity for all integers and . For the sum is the number written in base .
(c) Let . Then Subtract . The terms with have the coefficient . The term appears only in , with coefficient , and the term appears only in , with coefficient : Add : (For the sum is empty and both sides are .)
The route through Exercise 1.2.3-16 also works: write , use Eq. (14) and the formula of Exercise 1.2.3-16 with in place of . The direct way above is shorter.
Check
For and : . For : (ten ones). For and : , and .
Remarks
The identity holds in every base, but it reads as a pattern of digits only while . In base the pattern stops being a string of ones at , where the digit needs a carry.
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_3.Ex20.statementaxioms: Classical.choice, Quot.sound, propext - Solution:
TAOCP.S1_2_3.Ex20.solvedaxioms: Classical.choice, Quot.sound, propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.