Let . Define : either or and the sum of all the elements of is a prime number. Then the number of elements in the set is ______.
Solution
Core idea. A union is counted as one family plus the members of the other that lie outside it.
Concept refresher. A set of elements has
subsets, and those that avoid given elements number .
Picture the situation. The condition for fails only for subsets with and . So is large, and the union consists of together with the subsets outside whose sum is prime. Such a subset is joined to a subset of .
Approach. Count the first family, then add the subsets outside it whose sum is prime.
Step 1: The first family
The subsets with 1 and without 2 number , so has elements.
Step 2: Prime sums outside it
For the sum is 1 more than the sum of , so must add to 4, 6, 10, 12, 16, 18 or 22. The sets are , , , , , , , , , and , which is 11.
Step 3: The union
These 11 subsets are added to the 96 of , so the union has elements.
Answer. 107
Sanity check. The numbers 3 to 7 add to 25, so the largest possible sum of is 26, and the primes used are 5, 7, 11, 13, 17, 19 and 23.
Common wrong answers
- 108: Counting , whose sum 1 is not a prime, gives 108.
Key takeaway
The trap. The number 1 is not prime.
How toppers think. They describe the complement of the larger family and search only there.
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 ›