Maths Olympiad Prep

Track / Stage 5 / 33 of 400 #1113 of 2444

Problem 1113

AIME late
Number theory Difficulty 5.0 Find the answer Japan Mathematical Olympiad · Japan

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

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

Next problem →

Official solution

Note that 20111(mod3)2011 \equiv 1 \pmod 3. So, we see that AA is the sum of the numbers
30+1, 31+1, , 3669+1, 3670+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
30+2, 31+2, , 3668+2, 3669+2. 3 \cdot 0 + 2,\ 3 \cdot 1 + 2,\ \dots,\ 3 \cdot 668 + 2,\ 3 \cdot 669 + 2.
For 0i6690 \le i \le 669 we have (3i+1)(3i+2)=1(3i+1)-(3i+2)=-1 so we obtain
AB=(1)×670+(3670+1)=1341. A - B = (-1) \times 670 + (3 \cdot 670 + 1) = 1341.

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