Two nice number theory (NT) flavored problems were given at the recent RMM (Romanian Master of Mathematics) competition. The only needed knowledge of NT that one has to have in order to solve them consists of the following two facts. For any prime 1) If then 2) For any integers with we have or
Yes, a fifth grader knows it. Still the problems are not so easy. Some people want strict boundaries between different subjects in math competitions. They want for example some “pure” NT problems. Of course, mathematics has different subjects. But they share common methods and technique called Math. Take for example the Euler’s theorem about the totient function.
The proof of it goes like that. One takes the set of all residues modulo that are coprime with . Then one takes and considers the set It follows from very basic facts that all these numbers give distinct residues modulo and all of them are coprime with This allows us to conclude , that is, the second system of residues is just a permutation of the first one. Multiplying the elements in and the elements in (the same sets modulo ), we get
Since (by the definition of ), the result in follows.
One might argue that there is very little NT stuff in this proof – you take a set, multiply each of its elements and get a permutation – this could be seen as combinatorics! But it is still a number theory theorem. I thinks it’s silly to argue whether a problem is combinatorics or number theory, or something else. They all intertwine.
Let’s continue with the two mentioned NT problems from RMM 2024.
RMM 2024, Problem 2. Consider an odd prime and a positive integer . Let be a list of positive integers less than such that any specific value occurs at most times and is not divisible by . Prove that there exists a permutation of the such that, for all , the sum is not divisible by .
(Will Steinberg, United Kingdom)
The following solution is similar to the official one, but it emphasizes on a constructive algorithm. Suppose we initially have a multiset of residues modulo (we allow ) that satisfies the condition
Then can be arranged in a row that satisfies the problem’s condition. This arrangement can be done via a greedy algorithm with a little bit common sense. Here it is.
Because of condition there are at least two distinct values in . So, we start putting the elements of in a row, each time picking a residue that avoids a certain residue, i.e. it avoids the sum of the already arranged residues taken with a negative sign. Assume at some moment, we have a multiset such that some of its values, say occurs exactly times. We try to pick this value, and if we cannot do this, because we would hit , then we pick another residue , put it in the row and we put immediately after . Thus, we comply with the given condition and we are at position with a multiset that consists of elements. The point is that still satisfies $(1)$, so we can continue with the same algorithm.
It remains to see what to do when initially some value in occurs times and times. This time we want . So,
Now, we put all the elements equal to , but no more than of them, one after another in a row. Any partial sum of this row is not , since . Because of and the fact that , it easily follows that the remaining elements form a multiset that satisfies . Further, we proceed with the above algorithm, avoiding a certain residue each time.
The next problem is problem 4 from the same competition.
RMM 2024, problem 4. Fix integers and greater than . For any positive integer , let be the (non-negative) remainder that leaves upon division by . Assume there exists a positive integer such that for all integers . Prove that divides .
(Pouria Mahmoudkhan Shirazi, Iran)
Assume that is not multiple of Hence, where and . In this case we’ll prove something stronger. Namely, it’s even not possible that , where , that is, it’s not possible that .
Assume on the contrary it holds. Thus,
Multiplying both sides by it yields
It means that
where denotes the fractional part. Now, for sufficiently large we have since . Note that is either integer or its distance to the nearest integer is at least It gives us This leads us to contradiction if we take a special such that It is possible since
This problem is similar to Izho 2021, problem 1 – see [3] – the idea is the same. In fact, we proved that for given positive integers and is not multiple of we can find infinitely many such that the residue that leaves upon division by is greater than for some constant that depends only on and
References.
[1] RMM 2024, p.2 – AoPS thread.
[2] RMM 2024, p.4 – AoPS thread.
[3] IZhO 2021, p.1 – AoPS thread.