Maths Olympiad Prep

Library / /40 of 87

Number theory Difficulty 6.3 National Olympiad Prove it Serbia

Problem:

Find all natural numbers nn for which there exists a permutation (p1,p2,,pn)(p_{1}, p_{2}, \ldots, p_{n}) of the numbers (1,2,,n)(1,2, \ldots, n) such that the sets {pi+i1in}\{p_{i}+i \mid 1 \leqslant i \leqslant n\} and {pii1in}\{p_{i}-i \mid 1 \leqslant i \leqslant n\} form complete systems of residues modulo nn. (Marko Đikić)

Solution

Solution:

Suppose that such a permutation exists. Since {pi+i1in}\{p_{i}+i \mid 1 \leq i \leq n\} is a complete system of residues modulo nn, we have k=1nki=1n(pi+i)i=1ni+i=1npi2k=1nk (mod n)\sum_{k=1}^{n} k \equiv \sum_{i=1}^{n}(p_{i}+i) \equiv \sum_{i=1}^{n} i+\sum_{i=1}^{n} p_{i} \equiv 2 \sum_{k=1}^{n} k\ (\bmod\ n), hence k=1nk=n(n+1)20 (mod n)\sum_{k=1}^{n} k=\frac{n(n+1)}{2} \equiv 0\ (\bmod\ n), from which it follows that 2n2 \nmid n.

Moreover, we have 2k=1nk2k=1n((pi+i)2+(pii)2)k=1n(2pi2+2i2)4k=1nk22 \sum_{k=1}^{n} k^{2} \equiv \sum_{k=1}^{n}\left((p_{i}+i)^{2}+(p_{i}-i)^{2}\right) \equiv \sum_{k=1}^{n}\left(2 p_{i}^{2}+2 i^{2}\right) \equiv 4 \sum_{k=1}^{n} k^{2}, from which 2k=1nk2=n(n+1)(2n+1)30 (mod n)2 \sum_{k=1}^{n} k^{2}=\frac{n(n+1)(2 n+1)}{3} \equiv 0\ (\bmod\ n), hence 3n3 \nmid n.

Therefore, we must have (n,6)=1(n, 6)=1.

On the other hand, if (n,6)=1(n, 6)=1 and pi2i (mod n), pi{1,,n}p_{i} \equiv 2 i\ (\bmod\ n),\ p_{i} \in\{1, \ldots, n\}, then (p1,p2,,pn)(p_{1}, p_{2}, \ldots, p_{n}) is a permutation of the set {1,,n}\{1, \ldots, n\} and satisfies the conditions, since {pi+i1in}{3i1in}\{p_{i}+i \mid 1 \leq i \leq n\} \equiv\{3 i \mid 1 \leq i \leq n\} and {pii1in}{i1in}\{p_{i}-i \mid 1 \leq i \leq n\} \equiv\{i \mid 1 \leq i \leq n\} (mod n)(\bmod\ n) are complete systems of residues modulo nn.

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: MathNet, licensed CC-BY-4.0. Statement translated into English from sr; metadata (topic, difficulty) added by this project.