# Is this identity about floor function true?

When $a, b, c$ are positive integers, is this identity below is true for all $a, b, c$?

$$\left\lfloor \frac{\left\lfloor\frac ab \right\rfloor}c \right\rfloor =\left\lfloor \frac{\left\lfloor\frac ac \right\rfloor}b \right\rfloor$$

• Consider adding a tag for a broader subject area to which the question belongs. Some of these tags might fit. (autocomment) – user147263 Feb 9 '16 at 20:49
• Probably not if a = 27 and b = 8 [a/b] =4. if c = 1.9. the [[a/b]/c] = [4/1.9] = 3. And [a/c] = 15. And [[a/c]/8] = [15/8] = 2. – fleablood Feb 9 '16 at 20:58
• @fleablood 1.9 is not a positive integer tho – Hagen von Eitzen Feb 9 '16 at 20:58
• meh...$$– fleablood Feb 9 '16 at 21:04 • Sorry, it is floor function not ceiling function. – esege Feb 9 '16 at 21:05 ## 1 Answer Using division with remainder write a=qbc+r with 0\le r<bc and then write r=q'b+r' with 0\le r'<b, as well as r=q''c+r'' with 0\le r''<c. So a=qbc+q'b+r'=qbc+q''c+r''. Because 0\le r<bc we conclude that 0\le q'<c and 0\le q''<b. Then$$ \left\lfloor\frac{\left\lfloor\frac ab\right\rfloor}c\right\rfloor= \left\lfloor\frac{qc+q'}c\right\rfloor=q$$and$$ \left\lfloor\frac{\left\lfloor\frac ac\right\rfloor}b\right\rfloor= \left\lfloor\frac{qb+q''}c\right\rfloor=q.$$So indeed$$\left\lfloor\frac{\left\lfloor\frac ac\right\rfloor}b\right\rfloor=\left\lfloor\frac{\left\lfloor\frac ab\right\rfloor}c\right\rfloor =\left\lfloor\frac a{bc}\right\rfloor.

• I confess that I'm somewhat surprised by this. I would have suspected it to be false. +1. – MPW Feb 9 '16 at 21:45
• @MPW Me too, but the counterexamples kept failing :) – Hagen von Eitzen Feb 9 '16 at 21:47
• Yes, that was my experience. I even tried a small spreadsheet with all a,b,c in the range 1-5. Oh well, live and learn. – MPW Feb 9 '16 at 21:48
• In hindsight it makes sense. Ceiling works as well. ceiling = q + 1 if r > 0. I can't tell you how long I struggled without realizing q' < c and q" < b. – fleablood Feb 10 '16 at 1:26