Maths Olympiad Prep

Library / IMO Shortlist /82 of 365

IMO Shortlist

Number theory Difficulty 8.1 Shortlist Find the answer

Determine all integers n⩾2n\geqslant 2 with the following property: every nn pairwise distinct integers whose sum is not divisible by nn can be arranged in some order a1,a2,…,ana_1,a_2,\ldots, a_n so that nn divides 1⋅a1+2⋅a2+⋯+n⋅an.1\cdot a_1+2\cdot a_2+\cdots+n\cdot a_n.

Arsenii Nikolaiev, Anton Trygub, Oleksii Masalitin, and Fedir Yudin

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

To solve the problem, we need to determine all integers n≥2 n \geq 2 such that for any set of n n pairwise distinct integers whose sum is not divisible by n n , there exists a permutation of these integers a1,a2,…,an a_1, a_2, \ldots, a_n satisfying:

n∣(1⋅a1+2⋅a2+⋯+n⋅an). n \mid (1 \cdot a_1 + 2 \cdot a_2 + \cdots + n \cdot a_n).

### Analysis:

1. Understanding the Conditions:
- We are given n n integers a1,a2,…,an a_1, a_2, \ldots, a_n such that their sum is not divisible by n n :
a1+a2+⋯+an≢0(modn). a_1 + a_2 + \cdots + a_n \not\equiv 0 \pmod{n}.

2. Objective:
- Find integers n n for which no matter how the integers are arranged, the weighted sum 1⋅a1+2⋅a2+⋯+n⋅an≡0(modn) 1 \cdot a_1 + 2 \cdot a_2 + \cdots + n \cdot a_n \equiv 0 \pmod{n} .

3. Consideration for Powers of 2:
- Let us consider n n being a power of 2, say n=2k n = 2^k . The important property of powers of 2 is that each number 1,2,…,2k 1, 2, \ldots, 2^k appears with equal frequency in any modular arithmetic computation involving 2k 2^k .

4. Consideration for Odd Numbers:
- For odd n n , a notable property is that the cyclic sums and permutations tend to distribute residues in a way such that they cover all possible remainders when divided by n n .

5. Constructing Examples:
- Construct examples for small odd numbers and powers of 2 and verify the conditions:
- For n=3 n = 3 , consider numbers such as {1,2,4}\{1, 2, 4\}: arranging them as {2,1,4}\{2, 1, 4\} yields a sum not divisible by 3 but:
1⋅2+2⋅1+3⋅4=2+2+12=16, 1 \cdot 2 + 2 \cdot 1 + 3 \cdot 4 = 2 + 2 + 12 = 16,
which is divisible by 3.

6. Conclusion:
- Through analysis, it becomes evident that if n n is odd or of the form n=2k n = 2^k , then regardless of the initial sum, we can always find such permutations where the weighted sum is divisible by n n .

Thus, the integers n n that satisfy the given property are all odd numbers and powers of 2. Therefore, the solution to the problem is:
Odd numbers and powers of 2. \boxed{\text{Odd numbers and powers of 2}}.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.