SOLVETUTORMATH SOLVER

Instrument MI-01-538 · Mathematics

Set Builder Calculator

Set-builder notation names a group by the rule its members obey. This sheet counts how many whole numbers in a range satisfy one such rule without listing a single one.

Instrument MI-01-538
Sheet 1 OF 1
Rev A
Verified
Type 05 — Algebra SER. 2026-01538

Count of integers in [a,b] divisible by k

6

total = ⌊b⁄k⌋ − ⌊(a−1)⁄k⌋

The working Every figure verified twice
  1. total = floor(20 ⁄ 3) − floor((1 − 1) ⁄ 3) = 6
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

Set-builder notation describes a group by stating the rule its members must satisfy, rather than writing every member out by hand. The expression {n ∈ [a,b] : n divisible by k} reads as 'every whole number n between a and b such that k divides n evenly' — the part before the colon names what kind of object n is and where it lives, and the part after the colon states the test each candidate must pass to earn a place in the group.

Listing members directly works fine when there are only a handful, but it breaks down fast across a wide range: writing out every multiple of 3 between 1 and 2,000 by hand invites mistakes and wastes time. The rule stated inside the notation, though, translates straight into a counting formula with no listing required: total = ⌊b⁄k⌋ − ⌊(a−1)⁄k⌋, where each floor term counts how many multiples of k sit at or below a given value, and subtracting strips out everything below where the range actually begins.

The floor function, written ⌊x⌋, rounds any figure down to the nearest whole number, and that rounding is exactly what makes the counting formula work. ⌊b⁄k⌋ counts every multiple of k from 1 up through b, while ⌊(a−1)⁄k⌋ counts that same thing only up through one below where the range starts, so the gap between the two counts leaves precisely the multiples landing inside [a,b] and nowhere outside it.

total=bka1k\text{total} = \left\lfloor \frac{b}{k} \right\rfloor - \left\lfloor \frac{a-1}{k} \right\rfloor
a — range start; b — range end; k — the divisibility target; ⌊·⌋ — the floor function, rounding down to the nearest whole number; total — the count of whole numbers in [a,b] that k divides evenly.
  • Enter the range start into a and the range end into b.
  • Enter the divisibility target into k — the figure every counted whole number must divide evenly by.
  • Read total: the count of whole numbers between a and b, inclusive, that k divides evenly.
  • Widen or narrow a and b to watch total track exactly how many multiples of k fall inside, without ever listing them one by one.

Worked example — multiples of 3, 5, and 7

The group {n ∈ [1,20] : n divisible by 3} names every whole number from 1 to 20 that 3 divides evenly: 3, 6, 9, 12, 15, and 18, six figures altogether. The formula reaches that same six without listing anything: ⌊20⁄3⌋−⌊0⁄3⌋=6−0=6, since 20⁄3=6.67 rounds down to 6 and 0⁄3 stays at 0.

Widen the range to {n ∈ [10,50] : n divisible by 5}: written out directly the list runs 10, 15, 20, 25, 30, 35, 40, 45, 50 — nine figures — and the formula agrees, ⌊50⁄5⌋−⌊9⁄5⌋=10−1=9, since 9⁄5=1.8 rounds down to 1. Narrow it sharply to {n ∈ [1,10] : n divisible by 7} and only 7 itself qualifies: ⌊10⁄7⌋−⌊0⁄7⌋=1−0=1.

Questions

What does set-builder notation actually mean?

It names a group by the rule its members must pass rather than by listing them. {n ∈ [1,20] : n divisible by 3} reads as 'every whole number n from 1 to 20 that 3 divides evenly' — the rule stands in for a written-out list of 3, 6, 9, 12, 15, 18.

Why does the counting formula use a floor function?

Because dividing b by k rarely lands on a whole number, and only whole multiples count. Rounding that quotient down with ⌊b⁄k⌋ gives the exact tally of multiples of k from 1 through b, which is the building block the rest of the formula subtracts from.

How many multiples of 3 sit between 1 and 20?

Six: 3, 6, 9, 12, 15, and 18. The formula agrees directly, ⌊20⁄3⌋−⌊0⁄3⌋=6−0=6, reaching that count without writing out a single one of the six figures.

How many multiples of 5 fall between 10 and 50?

Nine: 10, 15, 20, 25, 30, 35, 40, 45, and 50. Via the formula, ⌊50⁄5⌋−⌊9⁄5⌋=10−1=9, matching the direct count exactly.

Why subtract using a−1 rather than a itself?

So the range start stays included in the count rather than excluded from it. Using a−1 shifts the second floor term down by one whole number, which counts everything strictly below a and leaves a itself available to be captured by the first term whenever a is itself a multiple of k.

What if the range start is already divisible by k?

It still gets counted correctly. Because the second floor term uses a−1 rather than a, a itself is never subtracted away — try a=10, b=50, k=5 above, where 10 is a multiple of 5 and still lands inside the total of 9.

References