Exercise · Volume 1 · 1.2.4-33
Exercise 1.2.4-33
proved in Lean solution written
| Rating | M18 |
|---|---|
| Markers | M (mathematical) |
| Kind | K3, find a value: compute a number, a set or a closed form from the written solution |
| Section | Section 1.2.4 of Volume 1. Companion chapter: Integer functions and elementary number theory |
The task
Find the value of and of the same expression with ceilings, for integers and .
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
Split into two cases by the parity of .
Hint 2
For an integer , if is even and if is odd. For the ceiling the odd case is .
Solution
Show the solution
Put and . Then , so and have opposite parity.
(a) If is even, then is odd and the sum is . If is odd, then is even and the sum is . So the value is .
(b) If is even, the sum is . If is odd, it is . So the value is .
For this reads and .
Check
Take , . Then and . A run over all confirms both values.
Remarks
The first identity for is the case of Exercise 1.2.4-38 with . The result of (b) also follows from (a) with replaced by and the rule .
The book's answer takes another route: one of the two halves is an integer, so the equality case of Exercise 1.2.4-7 applies.
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_4.Ex33.statementaxioms: Classical.choice, Quot.sound, propext - Solution:
TAOCP.S1_2_4.Ex33.solvedaxioms: Classical.choice, Quot.sound, propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.