Browse · MathNet
PrintBaltic Way 2023 Shortlist
Baltic Way 2023 number theory
Problem
Call a pair of positive integers carroty if , where is the digit sum of . Find all carroty pairs .
Solution
Answer: .
Let us consider the case where . Then and note that as . Put , then . So . It is obvious that the only solutions in nonnegative integers to this inequality are and . Indeed, for , the left hand side grows faster. Therefore, either or and . Now we have only two cases left.
Case 1: and . We are left with the equation , for . Then , so . Moreover, taking into account the fact that the sum of digits does not change the number modulo 9, , i.e., , therefore or . So now we are left only with numbers , which we can easily check by substitution and see that there are no solutions.
Case 2: . In the same way, by checking modulo 9, we get that implies . Therefore either or is divisible by 3. is an obvious solution with all . Otherwise, . But then and . Therefore, . But from , we can conclude . Indeed, for , the left hand side increases faster. So we are left with and . We check all these cases to determine that only or are solutions.
Let us consider the case where . Then and note that as . Put , then . So . It is obvious that the only solutions in nonnegative integers to this inequality are and . Indeed, for , the left hand side grows faster. Therefore, either or and . Now we have only two cases left.
Case 1: and . We are left with the equation , for . Then , so . Moreover, taking into account the fact that the sum of digits does not change the number modulo 9, , i.e., , therefore or . So now we are left only with numbers , which we can easily check by substitution and see that there are no solutions.
Case 2: . In the same way, by checking modulo 9, we get that implies . Therefore either or is divisible by 3. is an obvious solution with all . Otherwise, . But then and . Therefore, . But from , we can conclude . Indeed, for , the left hand side increases faster. So we are left with and . We check all these cases to determine that only or are solutions.
Final answer
(1, b) for all positive integers b; (3, 2); (9, 1)
Techniques
Techniques: modulo, size analysis, order analysis, inequalitiesIntegers