Multiples • Topic 2 of 2

Multiple Counting

Counting how many numbers in a range satisfy a divisibility condition is pure floor arithmetic. In [1, N], the count of multiples of k is floor(N/k); in a general range [A, B] it is floor(B/k) − floor((A−1)/k). For "divisible by a OR b" you must avoid double counting the numbers divisible by both, which gives the inclusion–exclusion formula floor(N/a) + floor(N/b) − floor(N/LCM(a,b)). For "divisible by NEITHER", subtract that OR-count from N (complementary counting). "Exactly one of a, b" is the OR-count minus twice the both-count, or equivalently the two single-only pieces added. The CAT favourite is mixing these: "how many numbers up to 1000 are divisible by 2 or 3 but not 5". Build it in layers — compute each floor term, plug into inclusion–exclusion, then subtract or filter. Always read whether the range is inclusive and whether 0 is excluded; CAT ranges almost always start at 1.

✅ Solved examples

1. How many numbers from 1 to 1000 are divisible by 7?
Count = floor(1000/7) = 142.
2. How many numbers from 1 to 500 are divisible by 3 or 5?
floor(500/3) + floor(500/5) − floor(500/15) = 166 + 100 − 33 = 233.
3. How many numbers between 200 and 600 (inclusive) are multiples of 9?
floor(600/9) − floor(199/9) = 66 − 22 = 44.
4. How many numbers from 1 to 1000 are divisible by neither 2 nor 5?
OR-count = floor(1000/2) + floor(1000/5) − floor(1000/10) = 500 + 200 − 100 = 600. Neither = 1000 − 600 = 400.

✏️ Practice — try these, take hints as needed

1. How many numbers from 1 to 1000 are divisible by 13?
Use floor(N/k).
floor(1000/13).
13 × 76 = 988.
76
2. How many numbers from 1 to 600 are divisible by 4 or 6?
Inclusion–exclusion.
LCM(4,6) = 12.
floor(600/4) + floor(600/6) − floor(600/12).
200
3. How many numbers between 100 and 400 (inclusive) are multiples of 7?
floor(B/k) − floor((A−1)/k).
floor(400/7) − floor(99/7).
57 − 14.
43
4. How many numbers from 1 to 1000 are divisible by 3 but not by 4?
Multiples of 3 minus multiples of 12.
floor(1000/3) − floor(1000/12).
333 − 83.
250
5. How many numbers from 1 to 1200 are divisible by neither 4 nor 6?
OR-count via LCM(4,6)=12.
floor(1200/4)+floor(1200/6)−floor(1200/12) = 300+200−100 = 400.
1200 − 400.
800

📝 Topic test — 8 questions

Auto-graded with full solutions; saved to your dashboard. Use the calculator and formula sheet (top-right) any time.

Loading questions…