SASMO Inclusion-Exclusion: Three Divisibility Tests Can Share the Same Intersection

Among the integers from one through one hundred inclusive, how many are divisible by at least one of six, ten and fifteen? This original SASMO-style counting problem has three overlapping categories. The task is to count qualifying integers, not the number of divisibility statements they satisfy, and the upper endpoint is included.

Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send SASMO-S2-1130 and tell us your school year and question.

Count each single divisibility category

The multiples of six number floor of one hundred divided by six, or sixteen. There are ten multiples of ten and six multiples of fifteen. Their sum is thirty-two, but it is only a count with multiplicity. An integer such as thirty satisfies all three tests and has already appeared three times in that sum.

Find intersections through least common multiples

Being divisible by both six and ten means being divisible by their least common multiple, thirty. The same least common multiple occurs for six and fifteen, and for ten and fifteen. Each pair intersection therefore consists of thirty, sixty and ninety. Each pair contributes three, even though all three pair intersections happen to contain the same integers.

Subtract all three pair counts

Subtracting three for each of the three pairs changes the provisional count to twenty-three. This is not yet the final answer. A number in all three categories, such as thirty, was counted three times initially and then subtracted three times, leaving zero contributions. A qualifying integer should contribute one, so another correction is needed.

Restore the common triple intersection once

The least common multiple of six, ten and fifteen is thirty, so the triple intersection again contains three integers. Adding three gives twenty-six. For an integer in all three sets, the net weight is three minus three plus one, equal to one. That per-integer accounting explains the formula more clearly than simply memorising alternating signs.

Check through disjoint categories

There are thirteen integers divisible only by six, seven divisible only by ten, and three divisible only by fifteen. The three common multiples form a fourth disjoint category. There are no integers belonging to exactly two of these sets: any number satisfying two tests is divisible by thirty and satisfies the third. The disjoint total thirteen plus seven plus three plus three again equals twenty-six.

Keep endpoints and the event definition visible

If the interval included zero, zero would qualify as an additional common multiple and the answer would change. If the question asked for exactly one test, the answer would be twenty-three, not twenty-six. Stating the interval and whether the condition means at least one, exactly one or exactly two prevents a correct calculation from answering the wrong counting question.

Continue reading: SASMO Counting: No Correct Labels Requires More Than Subtracting Four Cases.

Contact Hanlin

Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send SASMO-S2-1130. Include your school year, country or competition region, experience and the question you want to discuss.

Scan to contact Hanlin on WeChat. Send SASMO-S2-1130.

Contact Hanlin on WeChat

On your phone, use the button or save the QR image and scan it within WeChat.

Official information and further reading: Source 1

Online Customer Service
Contact Customer Service