Maths Olympiad Prep

Library / /141 of 520

Number theory Difficulty 6.6 National olympiad Find the answer

Determine all natural numbers nn for which there exists a permutation (a1,a2,,an)(a_1,a_2,\ldots,a_n) of the numbers 0,1,,n10,1,\ldots,n-1 such that, if bib_i is the remainder of a1a2aia_1a_2\cdots a_i upon division by nn for i=1,,ni=1,\ldots,n, then (b1,b2,,bn)(b_1,b_2,\ldots,b_n) is also a permutation of 0,1,,n10,1,\ldots,n-1.

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

Solution

To determine all natural numbers n n for which there exists a permutation (a1,a2,,an) (a_1, a_2, \ldots, a_n) of the numbers 0,1,,n1 0, 1, \ldots, n-1 such that, if bi b_i is the remainder of a1+a2++ai a_1 + a_2 + \cdots + a_i upon division by n n for i=1,,n i = 1, \ldots, n , then (b1,b2,,bn) (b_1, b_2, \ldots, b_n) is also a permutation of 0,1,,n1 0, 1, \ldots, n-1 , we proceed as follows:

1. **Expression for bi b_i :**
bia1+a2++ai(modn) b_i \equiv a_1 + a_2 + \cdots + a_i \pmod{n}
We need (b1,b2,,bn) (b_1, b_2, \ldots, b_n) to be a permutation of 0,1,,n1 0, 1, \ldots, n-1 .

2. **Sum of bi b_i :**
i=1nbii=1n(a1+a2++ai)(modn) \sum_{i=1}^n b_i \equiv \sum_{i=1}^n (a_1 + a_2 + \cdots + a_i) \pmod{n}
This can be rewritten as:
i=1nbina1+(n1)a2++2an1+an(modn) \sum_{i=1}^n b_i \equiv n \cdot a_1 + (n-1) \cdot a_2 + \cdots + 2 \cdot a_{n-1} + a_n \pmod{n}

3. **Considering n=3 n = 3 :**
For n=3 n = 3 , we need to check if there exists a permutation (a1,a2,a3) (a_1, a_2, a_3) of 0,1,2 0, 1, 2 such that (b1,b2,b3) (b_1, b_2, b_3) is a permutation of 0,1,2 0, 1, 2 .

4. General Case Analysis:
- If n n is even, then n n must be a prime number. If n n is composite, then at least two of the bi b_i 's will be equal, which contradicts the requirement that (b1,b2,,bn) (b_1, b_2, \ldots, b_n) is a permutation of 0,1,,n1 0, 1, \ldots, n-1 .

5. Constructing the Permutation:
- For n n to be a prime number, we can construct the permutation (a1,a2,,an) (a_1, a_2, \ldots, a_n) such that (b1,b2,,bn) (b_1, b_2, \ldots, b_n) is a permutation of 0,1,,n1 0, 1, \ldots, n-1 .

6. **Example for n=5 n = 5 :**
- Consider n=5 n = 5 . We can take (a1,a2,a3,a4,a5)=(0,4,1,3,2) (a_1, a_2, a_3, a_4, a_5) = (0, 4, 1, 3, 2) .
- Then, bi b_i will be:
b1=0,b2=4,b3=0+4+1=50(mod5),b4=0+4+1+3=83(mod5),b5=0+4+1+3+2=100(mod5) b_1 = 0, \quad b_2 = 4, \quad b_3 = 0 + 4 + 1 = 5 \equiv 0 \pmod{5}, \quad b_4 = 0 + 4 + 1 + 3 = 8 \equiv 3 \pmod{5}, \quad b_5 = 0 + 4 + 1 + 3 + 2 = 10 \equiv 0 \pmod{5}
- This does not work, so we need to find another permutation.

7. Conclusion:
- The only natural numbers n n for which there exists such a permutation are prime numbers.

The final answer is n \boxed{ n } must be a prime number.

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

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.