Let ; ; ; and ; ; ; be two arithmetic progressions. The set is the union of the first terms of each sequence. How many distinct numbers are in ?
- A)
- B)
- C)
- D)
- E)
Answer
A
Key insight
Shared numbers start at 16 and go up by 21, but only up to 6010, where the first list ends. That gives 286 to subtract.
Solution
The set takes both lists together, but a number that appears on both lists is counted only once. So: total terms, minus the numbers on both lists.
1. The two lists. The first list is (add each time). Its th term is . The second list is (add each time). Its th term is .
2. Together they have terms. Now count the numbers that appear on both.
3. Which numbers are on both lists? The first list is the numbers that leave remainder when divided by . Walk down the second list and check: (remainder ), (remainder , yes!), (remainder ), (remainder ), (remainder , yes!). So the shared numbers are , going up by . That makes sense: is the first jump that is a whole number of s and of s.
4. How far do they go? A shared number must be on both lists, so it can be no bigger than , where the first list stops.
5. Count them. The shared numbers are for . We need , so , and . So runs from to : that is shared numbers.
6. Finish.
The answer is .
Why this works
To count two lists put together, add their sizes and subtract the overlap, because overlap numbers were counted twice. Numbers common to two "add " and "add " lists form their own list that adds each time; find its first term by trying a few values. The overlap can only go as far as the shorter list reaches.
Alternative approach
Count inside the second list. Its terms are for . A term is also on the first list when it is at most and leaves remainder when divided by . Trying gives , and the good ones are , every third . The size limit gives . The good values number , the same as before.
The trap
Counting shared numbers all the way up to 14030, where the second list ends, even though the first list stops at 6010.
Concise solution
The first progression is for : the numbers from up to . The second is for : the numbers from up to .
The two lists contribute terms, and is minus the number of values appearing in both.
A common value must be and . The smallest such number is (), and the condition repeats with period , so the common candidates are , i.e. . They must also lie within both ranges: at least (automatic) and at most , the cap of the first progression, which is the binding one. From we get , so : common values.
Therefore
The answer is .
Review in the AoPS books
- Introduction to Algebra, Chapter 21: Sequences & Series (§21.1, §21.2, §21.3, §21.4)
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic (§1.3)
- Intermediate Algebra, Chapter 17: More Sequences and Series (§17.1, §17.2)
Techniques
Bound the quantity above/below or estimate to pin it down · Set up the equation/formula and compute; no special trick needed