taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.4-34

Exercise 1.2.4-34

proved in Lean solution written

RatingM21
MarkersM (mathematical), recommended
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.4 of Volume 1. Companion chapter: Integer functions and elementary number theory

The task

Find the real numbers b>1b > 1 for which ⌊log⁡bx⌋=⌊log⁡b⌊x⌋⌋\lfloor \log_b x \rfloor = \lfloor \log_b \lfloor x \rfloor \rfloor for every real x≥1x \ge 1.

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

Try b=3/2b = 3/2 and b=2b = 2, and a few values of xx near a power of bb.

Hint 2

For a non-integer bb, the number bb itself is a good test value of xx.

Hint 3

For integer bb, use the fact that powers of bb are integers.

Solution

Show the solution

Answer. The condition holds if and only if bb is an integer.

Sufficiency. Let b≥2b \ge 2 be an integer and x≥1x \ge 1 real. Put m=⌊log⁡bx⌋m = \lfloor \log_b x \rfloor. Then m≥0m \ge 0 and bm≤x<bm+1b^m \le x < b^{m+1}. The number bmb^m is an integer not larger than xx, so bm≤⌊x⌋b^m \le \lfloor x \rfloor by the defining property of the floor. Also ⌊x⌋≤x<bm+1\lfloor x \rfloor \le x < b^{m+1}. Hence bm≤⌊x⌋<bm+1b^m \le \lfloor x \rfloor < b^{m+1}, and ⌊log⁡b⌊x⌋⌋=m\lfloor \log_b \lfloor x \rfloor \rfloor = m.

Necessity. Let b>1b > 1 be not an integer. Take x=bx = b. Then ⌊log⁡bb⌋=1\lfloor \log_b b \rfloor = 1. On the other side 1≤⌊b⌋<b1 \le \lfloor b \rfloor < b, so 0≤log⁡b⌊b⌋<10 \le \log_b \lfloor b \rfloor < 1 and ⌊log⁡b⌊b⌋⌋=0\lfloor \log_b \lfloor b \rfloor \rfloor = 0. The two sides differ. □\square

Check

With b=3/2b = 3/2 and x=1.5x = 1.5 the left side is 11 and the right side is ⌊log⁡1.51⌋=0\lfloor \log_{1.5} 1 \rfloor = 0. In a run over x=i/10x = i/10 for 10≤i<200010 \le i < 2000, the identity holds for b=2,3,4b = 2, 3, 4 and fails for b=3/2,5/2,7/2b = 3/2, 5/2, 7/2.

Remarks

The same argument works for the ceiling: ⌈log⁡bx⌉=⌈log⁡b⌈x⌉⌉\lceil \log_b x \rceil = \lceil \log_b \lceil x \rceil \rceil holds for all x≥1x \ge 1 exactly when bb is an integer. Compare Exercise 1.2.4-6 for the square root and Exercise 1.2.4-35 for the general principle behind this proof.

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.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.