Maths Olympiad Prep

Library / /3 of 83

Number theory Difficulty 5.0 AIME, harder Find the answer Japan

For positive integers nn, mm, kk, let us write n≡m(modk)n \equiv m \pmod k if n−mn - m is divisible by kk. Let AA be the sum of all positive integers aa less than or equal to 20112011 for which a≡1(mod3)a \equiv 1 \pmod 3, and BB be the sum of all positive integers bb less than or equal to 20112011 for which b≡2(mod3)b \equiv 2 \pmod 3. Find the value of A−BA - B.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Note that 2011≡1(mod3)2011 \equiv 1 \pmod 3. So, we see that AA is the sum of the numbers
3⋅0+1, 3⋅1+1, …, 3⋅669+1, 3⋅670+1, 3 \cdot 0 + 1,\ 3 \cdot 1 + 1,\ \dots,\ 3 \cdot 669 + 1,\ 3 \cdot 670 + 1,
while BB is the sum of the numbers
3⋅0+2, 3⋅1+2, …, 3⋅668+2, 3⋅669+2. 3 \cdot 0 + 2,\ 3 \cdot 1 + 2,\ \dots,\ 3 \cdot 668 + 2,\ 3 \cdot 669 + 2.
For 0≤i≤6690 \le i \le 669 we have (3i+1)−(3i+2)=−1(3i+1)-(3i+2)=-1 so we obtain
A−B=(−1)×670+(3⋅670+1)=1341. A - B = (-1) \times 670 + (3 \cdot 670 + 1) = 1341.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.