Maths Olympiad Prep

Track / Stage 5 / 359 of 400 #959 of 1964

Problem 959

AIME late
Number theory Difficulty 5.9 Prove it

## Task 6 - 291236

Prove:

If you write all natural numbers nn with 111n999111 \leq n \leq 999 in any order consecutively, you will always get a sequence of digits that forms a number divisible by 37.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

If we represent an arbitrary natural number aa in the number system with base 1000, that is,

a=k=0mak1000k(0ak<1000,mN) a=\sum_{k=0}^{m} a_{k} 1000^{k} \quad\left(0 \leq a_{k}<1000, m \in \mathbb{N}\right)

then regarding divisibility by 37, due to 10001mod371000 \equiv 1 \bmod 37, the simple rule applies that aa is divisible by 37 if and only if its "digit sum" k=0mak\sum_{k=0}^{m} a_{k} is.

In the given case, the digits are simply all natural numbers from 111 to 999, and the order of these digits does not matter in terms of the digit sum. And yes, this digit sum, namely

111+9992(999111+1) \frac{111+999}{2}(999-111+1)

is indeed divisible by 37 because 111=337111=3 \cdot 37.

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