AMC 10 Step by Step

2004 AMC 10B Problem 21

P21-25~6 minPrint

Let 11 ; 44 ; 77 ; …\ldots and 99 ; 1616 ; 2323 ; …\ldots be two arithmetic progressions. The set SS is the union of the first 20042004 terms of each sequence. How many distinct numbers are in SS ?

Log in to save your progress.
Show solution without answering

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 SS 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 1,4,7,…1, 4, 7, \ldots (add 33 each time). Its 20042004th term is 1+3×2003=60101 + 3 \times 2003 = 6010. The second list is 9,16,23,…9, 16, 23, \ldots (add 77 each time). Its 20042004th term is 9+7×2003=140309 + 7 \times 2003 = 14030.
2. Together they have 2004+2004=40082004 + 2004 = 4008 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 11 when divided by 33. Walk down the second list and check: 99 (remainder 00), 1616 (remainder 11, yes!), 2323 (remainder 22), 3030 (remainder 00), 3737 (remainder 11, yes!). So the shared numbers are 16,37,58,…16, 37, 58, \ldots, going up by 2121. That makes sense: 2121 is the first jump that is a whole number of 33s and of 77s.
4. How far do they go? A shared number must be on both lists, so it can be no bigger than 60106010, where the first list stops.
5. Count them. The shared numbers are 16+21m16 + 21m for m=0,1,2,…m = 0, 1, 2, \ldots. We need 16+21m≤601016 + 21m \le 6010, so 21m≤599421m \le 5994, and m≤285.4…m \le 285.4\ldots. So mm runs from 00 to 285285: that is 286286 shared numbers.
6. Finish.
4008−286=3722.4008 - 286 = 3722.

The answer is (A) 3722\boxed{\textbf{(A)}\ 3722}.

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 33" and "add 77" lists form their own list that adds 3×7=213 \times 7 = 21 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 9+7l9 + 7l for l=0,1,2,…l = 0, 1, 2, \ldots. A term is also on the first list when it is at most 60106010 and leaves remainder 11 when divided by 33. Trying l=0,1,2,3,4l = 0, 1, 2, 3, 4 gives 9,16,23,30,379, 16, 23, 30, 37, and the good ones are l=1,4,7,…l = 1, 4, 7, \ldots, every third ll. The size limit 9+7l≤60109 + 7l \le 6010 gives l≤857l \le 857. The good values 1,4,7,…,8561, 4, 7, \ldots, 856 number 856−13+1=286\frac{856 - 1}{3} + 1 = 286, the same as before.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

The first progression is 3k+13k + 1 for k=0,1,…,2003k = 0, 1, \dots, 2003: the numbers ≡1(mod3)\equiv 1 \pmod 3 from 11 up to 3⋅2003+1=60103 \cdot 2003 + 1 = 6010. The second is 7l+97l + 9 for l=0,…,2003l = 0, \dots, 2003: the numbers ≡2(mod7)\equiv 2 \pmod 7 from 99 up to 7⋅2003+9=140307 \cdot 2003 + 9 = 14030.

The two lists contribute 2004+2004=40082004 + 2004 = 4008 terms, and ∣S∣|S| is 40084008 minus the number of values appearing in both.

A common value must be 1(mod3)1 \pmod 3 and 2(mod7)2 \pmod 7. The smallest such number is 1616 (16=15+1=14+216 = 15 + 1 = 14 + 2), and the condition repeats with period lcm⁡(3,7)=21\operatorname{lcm}(3, 7) = 21, so the common candidates are 16,37,58,…16, 37, 58, \dots, i.e. 16+21m16 + 21m. They must also lie within both ranges: at least 99 (automatic) and at most 60106010, the cap of the first progression, which is the binding one. From 16+21m≤601016 + 21m \le 6010 we get m≤599421=285.4…m \le \frac{5994}{21} = 285.4\ldots, so m=0,1,…,285m = 0, 1, \dots, 285: 286286 common values.

Therefore
∣S∣=4008−286=3722.|S| = 4008 - 286 = 3722.

The answer is (A) 3722\boxed{\textbf{(A)}\ 3722}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.