Browse · MathNet
PrintSAUDI ARABIAN IMO Booklet 2023
Saudi Arabia 2023 number theory
Problem
Let be a positive integer. There are 101 numbers written in a row: How many pairs of neighbouring numbers are there in this row such that the one on the left is bigger than the one on the right?
Solution
The answer is .
Indeed, the main claim is that is larger than if and only if there is a number divisible by between and . Denote by the remainder of when divided by . Note that , otherwise , a contradiction. Put and . Thus Since , it is easy to check that or .
If then and between and , there does not exist any multiple of . If then and between and , the number is a unique multiple of .
So all we are left with is calculating the quantity of non-zero numbers divisible by between and . This quantity is .
Indeed, the main claim is that is larger than if and only if there is a number divisible by between and . Denote by the remainder of when divided by . Note that , otherwise , a contradiction. Put and . Thus Since , it is easy to check that or .
If then and between and , there does not exist any multiple of . If then and between and , the number is a unique multiple of .
So all we are left with is calculating the quantity of non-zero numbers divisible by between and . This quantity is .
Final answer
n-1
Techniques
Modular ArithmeticFloors and ceilings