Olympiad Maths Prep

Track / Stage 4 / 330 of 340 #590 of 2000

Problem 590

AMC 12 late, AIME early
Number theory Difficulty 5.0 Find the answer

5. The numbers from 100 to 999 are written without spaces. What is the remainder when the resulting 2700-digit number is divided by 7?

Official solution

Solution.

Since 1001 is divisible by 7, we get 10001(mod7)1000n(1)n(mod7)1000 \equiv-1(\bmod 7) \Longrightarrow 1000^{n} \equiv(-1)^{n}(\bmod 7). Therefore, the given number is congruent modulo 7 to the number

999998+997996++101100=4502(mod7) 999-998+997-996+\ldots+101-100=450 \equiv 2(\bmod 7)

Answer: 2

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.