Maths Olympiad Prep

Library / /67 of 155

Number theory Difficulty 5.9 AIME, harder Prove it Saudi Arabia

Find all positive integer nn such that there exists a permutation (a1,a2,,an)\left(a_{1}, a_{2}, \ldots, a_{n}\right) of (1,2,3,,n)\left(1,2,3, \ldots, n\right) satisfying the condition:
a1+a2++ak is divisible by k for each k=1,2,3,,n a_{1}+a_{2}+\cdots+a_{k} \text{ is divisible by } k \text{ for each } k=1,2,3, \ldots, n \text{. }

Solution

It is easy to see that n=1n=1, n=3n=3 satisfy the given condition, while n=2n=2 does not. We will show that all numbers n>3n>3 do not satisfy the condition.

First, we can see that
a1+a2++an=1+2++n=n(n+1)2 a_{1}+a_{2}+\cdots+a_{n}=1+2+\cdots+n=\frac{n(n+1)}{2}
then n(n+1)2\frac{n(n+1)}{2} is divisible by nn, which means n+12Z\frac{n+1}{2} \in \mathbb{Z} or nn is an odd number. We also have
n1a1+a2++an1=n(n+1)2an=(n+1)(n1)2+n+12an n-1 \left\lvert\, a_{1}+a_{2}+\cdots+a_{n-1}=\frac{n(n+1)}{2}-a_{n}=\frac{(n+1)(n-1)}{2}+\frac{n+1}{2}-a_{n}\right.
Thus, n+12an\frac{n+1}{2}-a_{n} is divisible by n1n-1.

On the other hand,
(n1)<n+12an<n1 -(n-1)<\frac{n+1}{2}-a_{n}<n-1
then we must have
n+12an=0an=n+12 \frac{n+1}{2}-a_{n}=0 \Leftrightarrow a_{n}=\frac{n+1}{2}
It implies that
a1+a2++an1=n212. a_{1}+a_{2}+\cdots+a_{n-1}=\frac{n^{2}-1}{2} .
Continue, we have
n2a1+a2++an2=n212an1=(n2)(n+1)2+n+12an1 n-2 \left\lvert\, a_{1}+a_{2}+\cdots+a_{n-2}=\frac{n^{2}-1}{2}-a_{n-1}=\frac{(n-2)(n+1)}{2}+\frac{n+1}{2}-a_{n-1}\right.
Similarly, we get an1=n+12a_{n-1}=\frac{n+1}{2}, then an1=ana_{n-1}=a_{n}, which is a contradiction.

Hence, the only two satisfied values are n=1n=1 and n=3n=3. \square

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 and solution reproduced as published; topic and difficulty added by this site.