Browse · MathNet
PrintTeam selection tests for GMO 2018
Saudi Arabia 2018 number theory
Problem
Two positive integers and are called similar if one of them can be obtained from the other one by swapping two digits (note that a 0-digit cannot be swapped with the leading digit). Find the greatest integer such that is divisible by 13 and any number similar to is not divisible by 13.
Solution
Let be the number of digits of and let where are digits. If is obtained by swapping the -th and the -th digits, then Therefore implies that or . Hence, a number satisfies the property given in the problem if and only if , for all and no swap between -th and -th digits are possible if .
- If , one can swap the 0th and the 6th digits, hence does not satisfy the property. - If , one can swap the 0th and the 6th digits unless the 0th digit is 0, but if the 0th digit is 0, then no swap is possible.
Hence, satisfies the property if and only if , all the digits are distinct and the 0th digit is 0. Therefore, .
Considering all multiples of 13 that end with 0 below this level, one finds . Since the two greatest elements of this set do not have all distinct digits, the greatest integer .
- If , one can swap the 0th and the 6th digits, hence does not satisfy the property. - If , one can swap the 0th and the 6th digits unless the 0th digit is 0, but if the 0th digit is 0, then no swap is possible.
Hence, satisfies the property if and only if , all the digits are distinct and the 0th digit is 0. Therefore, .
Considering all multiples of 13 that end with 0 below this level, one finds . Since the two greatest elements of this set do not have all distinct digits, the greatest integer .
Final answer
9876230
Techniques
Modular ArithmeticMultiplicative order