Skip to main content
OlympiadHQ

Browse · MathNet

Print

42nd Balkan Mathematical Olympiad

number theory

Problem

A positive integer is called good if there exists some permutation of the numbers , denoted by such that and have different parities for every ; and for every , the sum is a quadratic residue modulo . Prove that there exist infinitely many good numbers, as well as infinitely many numbers which are not good. Remark: Here an integer is considered a quadratic residue modulo if there exists an integer such that .
Solution
First, we will show that all numbers with are not good. Indeed, consider the last sum in the given condition Suppose that there exists such that This means that , that is , so . Let with . Thus this implies that , which is not true. This proves the second part of the problem, i.e. that there are infinitely many numbers that are not good.

Now let be a prime number of the form . Consider the numbers Clearly, in this sequence, no two numbers are congruent modulo . Indeed, suppose that there is with then . But , contradiction. From there, it follows that the first numbers have distinct remainders in modulo . We reason similarly for the last numbers. Next suppose that there is with then . According to the well known properties of quadratic residues modulo a prime , we conclude that and , which is also a contradiction. Thus, the claim is proved.

Notice that for , two numbers and have different parity remainders in modulo (since the sum of the two remainders is , which is odd). Consider the remainder of when divided by . We denote by the odd remainders and by the even remainders; note that . Finally, consider the following permutation: Obviously, according to the above arguments, two consecutive numbers in the above permutation have different parity, and the sum of any first numbers in the permutation is either congruent to 0 or congruent to some number in , which is clearly a quadratic residue modulo . Thus, the constructed permutation as above satisfies the given conditions. Since there are infinitely many primes of the form , we have proved that there are infinitely many good numbers as well.

Techniques

Quadratic residuesPrime numbersIntegers