Daily

Random

Practice set

Baltic Way 1991 · Problem 11

Number Theory

All positive integers from 1 to 1000000 are divided into two groups consisting of numbers with odd or even sums of digits respectively. Which group contains more numbers?

Change pool

When you’re ready

Review material becomes available with the next Daily.

Review

Topics

Divisibility and factorization

Solutions

Solution

Among any ten integers a1…an0‾,a1…an1‾,…,a1…an9‾\overline{a_{1} \ldots a_{n} 0}, \overline{a_{1} \ldots a_{n} 1}, \ldots, \overline{a_{1} \ldots a_{n} 9} there are exactly five numbers with odd digit sum and five numbers with even digit sum. Thus, among the integers 0, 1, . , 999999 we have equally many numbers of both kinds. After substituting 1000000 instead of 0 we shall have more numbers with odd digit sum.