Maths Olympiad Prep

Library / Serbian Mathematical Olympiad /29 of 80

Serbian Mathematical Olympiad

Combinatorics Difficulty 6.0 AIME, harder Prove it Serbia

Problem:

Let n∈Nn \in \mathbb{N} and let AnA_{n} be the set of all permutations (a1,a2,…,an)\left(a_{1}, a_{2}, \ldots, a_{n}\right) of the set {1,2,…,n}\{1,2, \ldots, n\} such that
k∣2(a1+a2+⋯+ak) for every 1⩽k⩽n k \mid 2\left(a_{1}+a_{2}+\cdots+a_{k}\right) \quad \text{ for every } 1 \leqslant k \leqslant n
holds. Determine the number of elements of the set AnA_{n}.

Solution

Solution:

Let us denote by FnF_{n} the number of elements of the set AnA_{n}. We have F1=1,F2=2F_{1}=1, F_{2}=2 and F3=6F_{3}=6. For n>3n>3, consider any permutation (a1,a2,…,an)\left(a_{1}, a_{2}, \ldots, a_{n}\right) in AnA_{n}. Since n−1n-1 divides 2(a1+⋯+an−1)=n(n+1)−2an≡2−2an( mod n−1)2\left(a_{1}+\cdots+a_{n-1}\right)=n(n+1)-2 a_{n} \equiv 2-2 a_{n}(\bmod n-1), it follows that ana_{n} equals 1,n+121, \frac{n+1}{2} or nn.

Suppose that an=n+12a_{n}=\frac{n+1}{2}. Then n−2n-2 divides 2(a1+⋯+an−2)=n2−1−2an−1≡3−2an−1( mod n−2)2\left(a_{1}+\cdots+a_{n-2}\right)=n^{2}-1-2 a_{n-1} \equiv 3-2 a_{n-1}(\bmod n-2). Hence we must have 2an−1−3=n−22 a_{n-1}-3=n-2, but then an−1=n+12=ana_{n-1}=\frac{n+1}{2}=a_{n}, a contradiction.

If an=na_{n}=n, then (a1,…,an)→(a1,…,an−1)\left(a_{1}, \ldots, a_{n}\right) \rightarrow\left(a_{1}, \ldots, a_{n-1}\right) is a bijective mapping onto the set An−1A_{n-1}, so there are Fn−1F_{n-1} such permutations.

If an=1a_{n}=1, then (a1−1,…,an−1−1)\left(a_{1}-1, \ldots, a_{n-1}-1\right) is a permutation of {1,…,n−1}\{1, \ldots, n-1\} which belongs to the set An−1A_{n-1}, since 2((a1−1)+⋯+(ak−1))=2(a1+⋯+ak)−2k2\left(\left(a_{1}-1\right)+\cdots+\left(a_{k}-1\right)\right)=2\left(a_{1}+\cdots+a_{k}\right)-2 k is divisible by kk for 1⩽k⩽n−11 \leqslant k \leqslant n-1. As in the previous case, there are Fn−1F_{n-1} such permutations.

We conclude that Fn=2Fn−1F_{n}=2 F_{n-1} for n>3n>3, which together with F3=6F_{3}=6 gives Fn=3⋅2n−2F_{n}=3 \cdot 2^{n-2} for n⩾3n \geqslant 3.

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