The sum of all the elements of the setis
Solution
Core idea. A sum over numbers coprime to a given number is found by inclusion and exclusion on its prime factors.
Concept refresher. The multiples of up to are , where is the whole part of , and their sum is
Picture the situation. Since , a number has HCF 1 with 24 exactly when it is divisible by neither 2 nor 3. So the required sum is the sum of 1 to 100 with the multiples of 2 and of 3 taken out. The multiples of 6 belong to both groups.
Approach. Subtract the sums of the multiples of 2 and of 3 from the total, and add back the multiples of 6.
Step 1: The sums
The numbers 1 to 100 add to 5050. The multiples of 2 add to , the multiples of 3 to and the multiples of 6 to .
Step 2: The required sum
The multiples of 6 are removed twice, so they are added back once: .
Answer. 1633
Sanity check. These numbers are 1, 7, ..., 97, which are 17 terms adding to 833, and 5, 11, ..., 95, which are 16 terms adding to 800.
Common wrong answers
- 817: Forgetting to add back the multiples of 6 gives 817.
Key takeaway
The trap. Multiples of the product of two primes are removed twice and must be restored once.
How toppers think. They check with the two arithmetic progressions of numbers one and five more than multiples of six.
Remember.
More on Set Operations & Venn Diagrams
- Let A = {x: |x² - 10| ≤ 6} and B = {x: |x - 2| > 1}. Then
- Let S = {p₁, p₂, …, p₁₀} be the set of first ten prime numbers. Let A = S ∪ P, where P is the set of all…
- Let A = {x ∈ (0, π) - {π/2}: log(2/π)|sin x| + log(2/π)|cos x| = 2} and B = {x ≥ 0: √(x)(√(x) - 4) - 3|√(x)…
- All 31 on Set Operations & Venn Diagrams ›