Floor Ceiling Manipulation
MathDash
Last updated 2025-09-05
1 Pizza Slices and the Idea of Rounding Down
Example 1.1
s h y
a l
Ben has a huge pizza cut into 12 equally sized slices. He wants to pack identical lunch
n
boxes, each box getting at most 5 slices. How many full lunch boxes can Ben make?
hD O
t
Solution
a e
Let’s think it through like Ben would:
s
• Ben counts his slices: 12.
M U
• He groups them by fives: • First box: 5 slices (7 left) • Second box: 5 slices (2 left)
y l
• With only 2 slices left over, he can’t start a third full box.
B rna
So Ben can make 2 full lunch boxes.
What pattern did we just use?
te
We essentially performed “how many times does 5 fit into 12?” but we threw away any
leftover. In everyday language we said: 12 divided by 5 is 2 point something, but if we only
In
care about complete boxes, the answer is just 2.
That “just 2” is exactly what mathematicians mean by “rounding down the quotient.”
Definition 1.2 (Floor Function)
For any real number 𝑥 (think of decimals like 3.75 or −2.1), the floor of 𝑥 , written
⌊𝑥⌋ , is the greatest whole number 𝑘 that is still ≤ 𝑥 . In symbols: 𝑘 ≤ 𝑥 < 𝑘 + 1.
We can similarly define the ceiling function.
Definition 1.3 (Ceiling Function)
For any real number 𝑥 (think of decimals like 3.75 or −2.1), the ceiling of 𝑥 , written
⌈𝑥⌉ , is the smallest whole number 𝑘 that is still ≥ 𝑥 . In symbols: 𝑘 − 1 < 𝑥 ≤ 𝑘 .
© MathDash – All Rights Reserved
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
2 From Pictures to Symbols: Seeing the Floor as a
Staircase
Most of us see math better than we recite it. Let’s draw a graph to watch ⌊𝑥⌋ in action.
Example 2.1
Sketch the graph of 𝑦 = ⌊𝑥⌋ for −1 ≤ 𝑥 < 4.
Solution
We’ll walk through, one “block” at a time.
h
1. −1 ≤ 𝑥 < 0: The greatest integer ≤ 𝑥 is −1. So on this interval, 𝑦 = −1 (a flat
segment).
a s ly
2. 0 ≤ 𝑥 < 1: Here 𝑦 = 0.
3. 1 ≤ 𝑥 < 2: Here 𝑦 = 1.
D n
4. 2 ≤ 𝑥 < 3: Here 𝑦 = 2.
h O
t
5. 3 ≤ 𝑥 < 4: Here 𝑦 = 3.
a e
Put those horizontal pieces together and you get a staircase! Each piece is closed (solid)
s
on its left edge and open (hollow) on its right edge so we never assign two 𝑦 -values to
M
the same 𝑥 .
l U
𝑦
y
B rna
te
𝑥
In
Why the staircase matters
Each “step” is that interval where the floor stays constant. In contests or homework,
we often exploit that constant behavior: if a complicated floor shows up, we break the
problem into intervals where the floor is just a number.
Keep that staircase picture in your mental toolbox—it will rescue you later.
Flooring Negative Numbers: The Sneaky Half of the Staircase
Positive numbers feel cozy, but negatives sometimes surprise us. Let’s catch that surprise
with an example.
© MathDash – All Rights Reserved 2
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
Example 2.2
Compute ⌊−2.3⌋ and ⌊−2⌋ .
Solution
Think “greatest integer not exceeding 𝑥 ”—another way to say “move left on the number
line until you land on a whole number.”
• −2.3 is just to the left of −2. The next whole number leftward is −3. So ⌊−2.3⌋ = −3.
• −2 itself is already an integer. “Round down” means stay put, so ⌊−2⌋ = −2.
h
The usual “off-by-one” trap
s y
Many learners guess ⌊−2.3⌋ = −2 because they think “truncate the decimal part.” That
a l
shortcut fails for negatives. Always remember: going down means moving towards more
negative numbers.
hD O n
Theme 2.3 (Negative-number tip)
t
When 𝑥 is negative, ⌊𝑥⌋ is either 𝑥 itself (if 𝑥 is already an integer) or the integer
a e
one unit smaller (more negative) than the integer part you see.
M U s
y l
3 Turning a Floor into an Inequality: Unlocking Hidden
B rna
Ranges
Floors hide inside problems until we pop them open. Let’s practice popping.
te
Example 3.1
Find all real 𝑡 satisfying ⌊𝑡⌋ = 3.
In
Solution
Ask: “Which 𝑡 produce 3 when rounded down?” That’s exactly the interval where 3 is the
greatest integer still ≤ 𝑡 .
3 ≤ 𝑡 < 4.
So the answer is the entire interval [ 3, 4) .
General insight
We turned ⌊𝑡⌋ = 𝑚 into 𝑚 ≤ 𝑡 < 𝑚 + 1. That works for any integer 𝑚.
© MathDash – All Rights Reserved 3
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
Theme 3.2 (Peeling off the Brackets)
To solve ⌊𝑔 (𝑥)⌋ = 𝑚, replace the floor by the double inequality
𝑚 ≤ 𝑔 (𝑥) < 𝑚 + 1.
This converts a “mysterious” floor equation into a plain interval problem.
4 Counting Integers Inside a Floor-Defined Interval
Sometimes we care not about all 𝑥 but specifically about integers inside some interval
that popped out of a floor inequality.
Example 4.1
s h y
a l
How many integers 𝑛 satisfy ⌊𝑛/3⌋ = 4?
Solution
hD O n
t
Step 1: Convert to an interval using the peeling theme.
a s e 4≤
𝑛
<5 =⇒ 12 ≤ 𝑛 < 15.
M
3
l U
Step 2: List integers in [ 12, 15) :
y
12, 13, 14.
B rna
That’s 3 integers.
e
Why this feels so nice
t
Floors split the number line into equally sized blocks. By translating floors into intervals,
In
counting turns into an easy “how many integers fit?” puzzle.
Blocks Everywhere: Seeing Where the Floor is Constant
Let’s discover a bigger pattern through another example.
Example 4.2
For each integer 𝑘 , how many integers 𝑛 satisfy ⌊𝑛/5⌋ = 𝑘 ?
Solution
Use the same two-step attack:
𝑛
𝑘≤ < 𝑘+1 =⇒ 5𝑘 ≤ 𝑛 < 5𝑘 + 5 .
5 © MathDash – All Rights Reserved 4
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
Integers from 5𝑘 up to 5𝑘 + 4 work. That’s exactly 5 values. Notice: it doesn’t matter what
𝑘 is—positive, negative, anything—the block size is always 5.
Key takeaway
Whenever the expression inside the floor is 𝑛/𝑑 (with 𝑑 a positive integer), each step
(block) contains exactly 𝑑 integers.
Theme 4.3 (Constant-on-Blocks)
If the floor is ⌊𝑛/𝑑⌋ , then for each integer 𝑘 ,
⌊𝑛/𝑑⌋ = 𝑘
h
for exactly 𝑑 consecutive integers 𝑛.
a s ly
This idea helps you tackle summations and probability questions later on, but keep it in
n
your back pocket for now.
hD O
t
5 The Key Trick: Fractional Part Left Over
a s e
When you round down, you remove the “fractional tail.” What if we actually want that
tail?
y M l U
Example 5.1
B rna
Write 7.68 as the sum of an integer and its fractional part.
Solution
e
Integer part is ⌊ 7.68⌋ = 7. The leftover is 7.68 − 7 = 0.68. So
t 7.68 = 7 + 0.68.
In
Formalizing the leftovers
Definition 5.2 (Fractional Part)
For any real 𝑥 , define
{𝑥} = 𝑥 − ⌊𝑥⌋.
This “fractional part” always lies in [ 0, 1) .
The fractional part pairs beautifully with floors in many tricks: 𝑥 = ⌊𝑥⌋ + {𝑥} (obvious
but powerful).
Example 5.3
© MathDash – All Rights Reserved 5
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
Find all real numbers 𝑥 satisfying
𝑥 + 2𝑥 = 7 .
Solution
The key is to write
𝑥 = 𝑛+ 𝑓,
where
𝑛 = ⌊𝑥⌋ ∈ Z, 𝑓 = 𝑥 − 𝑛 ∈ [0, 1).
Then
⌊𝑥⌋ = 𝑛, ⌊2𝑥⌋ = ⌊2𝑛 + 2 𝑓 ⌋ = 2𝑛 + ⌊ 2 𝑓 ⌋.
h
Since 𝑓 ∈ [ 0, 1) , we have (
s
0, 0 ≤ 𝑓 < 21 ,
y
⌊2 𝑓 ⌋ = 1
1, ≤ 𝑓 < 1.
a l
2
Substitute into the equation:
D n 𝑛 + 2𝑛 + ⌊ 2 𝑓 ⌋ = 7 3𝑛 + ⌊ 2 𝑓 ⌋ = 7 .
=⇒
t h O
We split into two cases for ⌊ 2 𝑓 ⌋ :
a e
s
⌊2 𝑓 ⌋ = 0 Then 3𝑛 = 7. No integer 𝑛 satisfies this, so no solutions here.
M
⌊2 𝑓 ⌋ = 1 Then 3𝑛 + 1 = 7, so 3𝑛 = 6 and 𝑛 = 2. The condition ⌊2 𝑓 ⌋ = 1 means 2 𝑓 ∈ [1, 2) , i.e.
U
𝑓 ∈ [0.5, 1) . Hence
y l
𝑥 = 𝑛+ 𝑓 = 2+ 𝑓, 𝑓 ∈ [0.5, 1) =⇒ 𝑥 ∈ [2.5, 3).
B rna
One checks directly that every 𝑥 ∈ [ 2.5, 3) indeed satisfies ⌊𝑥⌋ + ⌊ 2𝑥⌋ = 7. Therefore the
full solution set is
𝑥 ∈ [2.5, 3).
te
In
Example 5.4 (Floor–Product via Integer & Fractional Parts)
Find all real numbers 𝑥 satisfying
𝑥 𝑥 = 243.
Solution
Write
𝑥 = 𝑛+ 𝑓,
where
𝑛 = ⌊𝑥⌋ ∈ Z, 𝑓 = 𝑥 − 𝑛 ∈ [0, 1).
Then
⌊𝑥⌋ = 𝑛, 𝑥 ⌊𝑥⌋ = (𝑛 + 𝑓 ) 𝑛 = 𝑛2 + 𝑛 𝑓 ,
© MathDash – All Rights Reserved 6
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
so the equation becomes
243 − 𝑛2
𝑛2 + 𝑛 𝑓 = 243 =⇒ 𝑓 = .
𝑛
Since 0 ≤ 𝑓 < 1, we require
243 − 𝑛2
0 ≤ < 1.
𝑛
We split into two cases depending on the sign of 𝑛.
**Case 1: 𝑛 > 0.** Then 0 ≤ ( 243 −𝑛2 )/𝑛 implies 243 −𝑛2 ≥ 0, so 𝑛2 ≤ 243 and 1 ≤ 𝑛 ≤ 15.
Meanwhile ( 243 − 𝑛2 )/𝑛 < 1 gives
243 − 𝑛2 < 𝑛 𝑛2 + 𝑛 − 243 > 0,
h
=⇒
s
whose positive integer solutions satisfy 𝑛 ≥ 16. No integer 𝑛 lies in both 1 ≤ 𝑛 ≤ 15 and
ly
𝑛 ≥ 16. Hence **no solutions** with 𝑛 > 0.
—
D a n
**Case 2: 𝑛 < 0.** Now 0 ≤ ( 243 − 𝑛2 )/𝑛 reverses to 243 − 𝑛2 ≤ 0, so 𝑛2 ≥ 243 and
h O
|𝑛| ≥ 16, i.e. 𝑛 ≤ −16. Also ( 243 − 𝑛2 )/𝑛 < 1 becomes
t e
243 − 𝑛2 > 𝑛 𝑛2 + 𝑛 < 243.
a
=⇒
s
The inequality 𝑛2 + 𝑛 < 243 holds for −16.088 < 𝑛 < 15.088. Combining with 𝑛 ≤ −16
M
forces
U
𝑛 = −16.
y l
For 𝑛 = −16,
B rna
243 − (−16) 2 243 − 256 −13 13
𝑓 = = = = ,
−16 −16 −16 16
which indeed lies in [ 0, 1) . Therefore
13 243
e
𝑥 = 𝑛 + 𝑓 = −16 + =− .
t
16 16
In
—
**Answer.**
243
𝑥=− .
16
6 Quick Mental Bounds with Monotonicity
Sometimes we don’t need exact answers—just easy bounds.
Example 6.1
99
∑︁ 1
Give a simple lower and upper bound for using the idea that the floor
𝑘=0
⌊𝑘/10⌋ + 1
stays constant on blocks of length 10.
© MathDash – All Rights Reserved 7
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
Solution
Group terms by 𝑘 in [ 10𝑚, 10𝑚 + 9] so ⌊𝑘/10⌋ = 𝑚.
9 10 𝑚+9 9
∑︁ ∑︁ 1
∑︁ 10
= .
𝑚 + 1 𝑚 + 1
𝑚=0 𝑘=10𝑚 𝑚=0
You can now estimate quickly:
10 1+ 12 + 13 +· · ·+ 10
1
is between 10 ( 1+1+1+1+· · · ) = 100 and 10 ( 1+1/2+· · ·+1/10) ≈ 29.
s h
So the whole sum lies in ( 29, 100) . (With more careful work you can squeeze it tighter,
y
a l
but notice how floors let us rewrite and bound things fast.)
D n
7 Putting It All Together: A Mini-Checklist
h O
t
Before we close this introductory handout, let’s build a quick mental checklist you can
a e
carry into problem sessions:
s
1. Draw or imagine the staircase. Where are the flat pieces? Do not fear sketching!
M U
2. Translate floors into inequalities. ⌊𝑔 (𝑥)⌋ = 𝑚 ⇐⇒ 𝑚 ≤ 𝑔 (𝑥) < 𝑚 + 1.
y l
3. Count blocks. How many 𝑥 (integers or reals) sit in each block? Remember constant-
B rna
on-blocks themes.
4. Watch the sign for negatives. Going “down” means moving to more negative
integers.
e
5. Connect with remainders. 𝑥 − 𝑑 ⌊𝑥/𝑑⌋ is your remainder friend.
t
6. Ceilings mirror floors. Swap ≤ and < appropriately.
In
7. Decompose with fractional parts. 𝑥 = ⌊𝑥⌋ + {𝑥} splits problems cleanly.
8. Use monotonicity for bounds. Floors are constant on intervals—great for bound-
ing sums or integrals.
8 Advanced Examples
Example 8.1
How many positive integers 𝑛 satisfy ⌊ log10 𝑛⌋ = 2?
Solution
Turn to inequalities:
© MathDash – All Rights Reserved 8
MathDash (Last updated 2025-09-05) Floor Ceiling Manipulation
2 ≤ log10 𝑛 < 3 =⇒ 102 ≤ 𝑛 < 103 =⇒ 100 ≤ 𝑛 < 1000.
So 𝑛 can be 100, 101, . . . , 999—that’s 900 numbers.
Notice: a floor of a logarithm groups numbers by the number of digits. Each block dou-
bles, triples, or in base-10 multiplies by 10 in size.
Example 8.2
Compute the sum
50 √
∑︁
𝑆= 𝑘 .
𝑘=1
s h y
a l
Solution
√ √
We group the values of ⌈ 𝑘⌉ according to the integer part of 𝑘 . Observe that for each
D n
positive integer 𝑚, √
h O
⌈ 𝑘⌉ = 𝑚 ⇐⇒ (𝑚 − 1) 2 < 𝑘 ≤ 𝑚2 .
t
Thus for 𝑚 = 1, 2, . . ., the value 𝑚 occurs exactly on the integers
a s e 𝑘 = (𝑚 − 1) 2 + 1, (𝑚 − 1) 2 + 2, . . . , 𝑚2 ,
M U
of which there are
𝑚2 − (𝑚 − 1) 2 = 2𝑚 − 1
y l
terms. We carry this out until 𝑚2 first exceeds 50.
B rna
Step 1. Find the largest 𝑚 with 𝑚2 ≤ 50. Since 72 = 49 and 82 = 64 > 50, we have 𝑚 = 7.
Thus √
𝑘 = 1, . . . , 49 =⇒ ⌈ 𝑘⌉ = 1, 2, . . . , 7
te
in blocks of sizes 1, 3, 5, 7, 9, 11, 13 respectively.
√ √
In
Step 2. Account for the “leftover” term 𝑘 = 50. Here 50 ≈ 7.07, so ⌈ 50⌉ = 8.
Hence
7
∑︁
𝑆 = 𝑚 ( 2𝑚 − 1) + 8.
𝑚=1
We compute
7 7 7
∑︁ ∑︁
2
∑︁ 7 · 8 · 15 7·8
𝑚( 2𝑚− 1) = 2 𝑚 − 𝑚 = 2· − = 2 · 140 − 28 = 280 − 28 = 252.
6 2
𝑚=1 𝑚=1 𝑚=1
Adding the final term,
𝑆 = 252 + 8 = 260.
260 .
© MathDash – All Rights Reserved 9