\section*{Problem 1 - 151011}

Determine all natural numbers \(n \geq 1\) with the following properties!

a) The sum of all natural numbers from 1 to \(n\) is a two-digit number, both of whose digits are the same.

b) The sum of all natural numbers from 1 to \(n\) is a three-digit number, all of whose digits are the same.
}

The sum \(S\) of the natural numbers from 1 to \(n\) is, according to the table of numbers, \(s=\frac{n(n+1)}{2}\).

a) Suppose, for a natural number \(n\), \(s\) is a two-digit number consisting of two identical digits. Then \(s\), and thus also \(s=n(n+1)\), is divisible by 11. Since 11 is a prime number, either \(n\) or \(n+1\) must be divisible by 11. If \(n \geq 14\), then \(s \geq 7 \cdot 15 > 100\), and thus not a two-digit number. Therefore, \(n < 14\).

b) Suppose, for a natural number \(n\), \(s\) is a three-digit number consisting of three identical digits. Then \(s\), and thus also \(s=n(n+1)\), is divisible by 111. Since 111 is a prime number, either \(n\) or \(n+1\) must be divisible by 111. If \(n \geq 45\), then \(s \geq 45 \cdot 46 / 2 > 1000\), and thus not a three-digit number. Therefore, \(n < 45, n+1 < 46\).

Thus, because \(111 = 3 \cdot 37\) and since 3 and 37 are prime numbers, one of the factors \(n, n+1\) must be divisible by 3 and the other must be 37. Since \(n+1\) is not divisible by 3 for \(n=37\), only \(n+1=37\) remains. Indeed, this yields \(s=\frac{36 \cdot 37}{2}=666\), a three-digit number consisting of three identical digits, as the only solution.