Maths Olympiad Prep

Library / /30 of 87

Combinatorics Difficulty 6.0 AIME, harder Prove it Serbia

Problem:

Let nNn \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
k2(a1+a2++ak) for every 1kn 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 n1n-1 divides 2(a1++an1)=n(n+1)2an22an(modn1)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 n2n-2 divides 2(a1++an2)=n212an132an1(modn2)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 2an13=n22 a_{n-1}-3=n-2, but then an1=n+12=ana_{n-1}=\frac{n+1}{2}=a_{n}, a contradiction.

If an=na_{n}=n, then (a1,,an)(a1,,an1)\left(a_{1}, \ldots, a_{n}\right) \rightarrow\left(a_{1}, \ldots, a_{n-1}\right) is a bijective mapping onto the set An1A_{n-1}, so there are Fn1F_{n-1} such permutations.

If an=1a_{n}=1, then (a11,,an11)\left(a_{1}-1, \ldots, a_{n-1}-1\right) is a permutation of {1,,n1}\{1, \ldots, n-1\} which belongs to the set An1A_{n-1}, since 2((a11)++(ak1))=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 1kn11 \leqslant k \leqslant n-1. As in the previous case, there are Fn1F_{n-1} such permutations.

We conclude that Fn=2Fn1F_{n}=2 F_{n-1} for n>3n>3, which together with F3=6F_{3}=6 gives Fn=32n2F_{n}=3 \cdot 2^{n-2} for n3n \geqslant 3.

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.