Maths Olympiad Prep

Library / /33 of 87

Number theory Difficulty 6.1 National Olympiad Prove it Serbia

Problem:

Determine all natural numbers nn (n>1n>1) which have the following property: if a1,a2,a3,,aka_{1}, a_{2}, a_{3}, \ldots, a_{k} are all natural numbers less than nn and relatively prime to nn, and the ordering a1<a2<a3<<aka_{1}<a_{2}<a_{3}<\cdots<a_{k} holds, then none of the sums ai+ai+1a_{i}+a_{i+1} for i=1,2,,k1i=1,2, \ldots, k-1 is divisible by 3.

Solution

Solution:

For n28n \leqslant 28 the condition of the problem is satisfied only for n{2,4,10}n \in\{2,4,10\}. Let n>28n>28. Notice that the sequence aia_{i} is symmetric with respect to n2\frac{n}{2}. Thus ai+ak+1i=na_{i}+a_{k+1-i}=n. If 2n2 \nmid n, then a1=1,a2=2a_{1}=1, a_{2}=2 and 3a1+a23 \mid a_{1}+a_{2}. On the other hand, if 3n3 \mid n, choose ii such that ai<n2<ai+1a_{i}<\frac{n}{2}<a_{i+1}: then 3ai+ai+1=n3 \mid a_{i}+a_{i+1}=n. Further, 2n2 \mid n and 3n3 \nmid n, so a2=3a_{2}=3. From this we also get ak1=n3a_{k-1}=n-3 and ak=n1a_{k}=n-1.
If n2(mod3)n \equiv 2(\bmod 3), then 3ak1+ak=2n43 \mid a_{k-1}+a_{k}=2 n-4. Only the case n1n \equiv 1 (mod3)(\bmod 3) remains.
Further, if ai+ai+12(mod3)a_{i}+a_{i+1} \equiv 2(\bmod 3), then aki+ak+1i=2n(ai+ai+1)0(mod3)a_{k-i}+a_{k+1-i}=2 n-\left(a_{i}+a_{i+1}\right) \equiv 0(\bmod 3). Therefore we may assume that ai+ai+11(mod3)a_{i}+a_{i+1} \equiv 1(\bmod 3) for i=i= 1,2,,k11,2, \ldots, k-1. By induction we find
a1a31 and a2a40(mod3) a_{1} \equiv a_{3} \equiv \cdots \equiv 1 \quad \text { and } \quad a_{2} \equiv a_{4} \equiv \cdots \equiv 0 \quad(\bmod 3)
Since (n,9)=1(n, 9)=1, it follows that a4=9a_{4}=9, and since a31(mod3)a_{3} \equiv 1(\bmod 3) we also have a3=7a_{3}=7. From this we obtain (n,7)=1(n, 7)=1 and (n,5)1(n, 5) \neq 1, i.e. 5n5 \mid n.
Now we have (n,21)=(n,27)=1(n, 21)=(n, 27)=1, but the numbers 22,24,2522,24,25 and 26 are not relatively prime to nn, and by ()(*) the number 23 also cannot occur in the sequence a1,,aka_{1}, \ldots, a_{k}. Thus 21 and 27 are neighbors in the sequence a1,,aka_{1}, \ldots, a_{k}, but 321+273 \mid 21+27, a contradiction.
Therefore, the only solutions are 2, 4 and 10.

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.