Skip to main content
OlympiadHQ

Browse · MathNet

Print

BMO 2022 shortlist

2022 number theory

Problem

Let be a positive integer. What is the smallest sum of digits of ?
Solution
We will prove that the smallest sum is equal to . One case when it is achieved is for .

Suppose that for some it is possible to obtain a smaller sum than . Observing the last digit of the number , we can easily conclude that It follows that . We now consider these two cases.

Case 1: If , then From here, due to the last digit being equal to , it is only possible for the sum of the digits to be equal to . Since , the penultimate digit must be equal to , and all other digits (except the first) are equal to . So the last digits of are and therefore . On the other hand, since and we have , a contradiction.

Case 2: If , then Due to the last digit, the only possibility is so for some . Now the sum of the digits is , and the last digit is . Let's use the divisibility criterion with . (A number when divided by gives the same remainder as the sum of its three-digit blocks that are formed from right to left.) Since must be equal to one of or , according to the above criterion . I.e. congruent to .

On the other hand, since it is easy to check that , and we have that This is a contradiction.

---

Alternative solution.

Let . We have . For we have and for we have Thus for and we have So for and we have The only possibilities for the sum of the digits of to be less than are where the last two digits of are respectively. (The case is rejected since then we must have which is impossible.)

Now for and we have . Looking modulo , the only possibilities are and in those cases the last two digits of are respectively and the sum of digits of are respectively.

So the only possibilities are where the last two digits of are and respectively, and the sum of digits of are and respectively.

The only possibilities are therefore for to be equal to a number of the form or or . In particular, using the alternating sum of digits criterion for divisibility by we have that the first number is congruent to , the second congruent to and the third congruent to .

We now look at . It can be easily checked that for we have and for we have So all three cases lead to a contradiction.
Final answer
8

Techniques

Modular ArithmeticDivisibility / Factorization