Maths Olympiad Prep

Library / /3 of 13

Number theory Difficulty 6.2 National olympiad Find the answer

Find all odd positive integers n>1n>1 such that there is a permutation a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} of the numbers 1,2,,n1,2, \ldots, n, where nn divides one of the numbers ak2ak+11a_{k}^{2}-a_{k+1}-1 and ak2ak+1+1a_{k}^{2}-a_{k+1}+1 for each k,1knk, 1 \leq k \leq n (we assume an+1=a1a_{n+1}=a_{1} ).

A number or a short expression. Spacing and $ signs are ignored.

Solution

Since {a1,a2,,an}={1,2,,n}\{a_{1}, a_{2}, \ldots, a_{n}\}=\{1,2, \ldots, n\} we conclude that aiaja_{i}-a_{j} : nn only if i=ji=j. From the problem conditions it follows that ak+1=ak2+εknbka_{k+1}=a_{k}^{2}+\varepsilon_{k}-n b_{k} where bkZb_{k} \in \mathbb{Z} and εk=±1\varepsilon_{k}= \pm 1. We have ak+1al+1=(akal)(ak+al)+(εkεl)n(bkbl)a_{k+1}-a_{l+1}=\left(a_{k}-a_{l}\right)\left(a_{k}+a_{l}\right)+\left(\varepsilon_{k}-\varepsilon_{l}\right)-n\left(b_{k}-b_{l}\right). It follows that if ak+al=na_{k}+a_{l}=n then εkεl\varepsilon_{k} \neq \varepsilon_{l} otherwise ak+1al+1na_{k+1}-a_{l+1} \vdots n - contradiction. The condition εkεl\varepsilon_{k} \neq \varepsilon_{l} means that εk=εl\varepsilon_{k}=-\varepsilon_{l}. Further, one of the aia_{i} equals nn. Let, say, am=na_{m}=n. Then the set {a1,a2,,an}\{am}\{a_{1}, a_{2}, \ldots, a_{n}\} \backslash\{a_{m}\} can be divided into n12\frac{n-1}{2} pairs (ak,al)\left(a_{k}, a_{l}\right) such that ak+al=na_{k}+a_{l}=n. For any such pairs of indices k,lk, l we have εk+εl=0\varepsilon_{k}+\varepsilon_{l}=0. Now add all the equalities for k=1,2,,nk=1,2, \ldots, n. Then k=2n+1ak=k=1nak2nk=1nbk+εm\sum_{k=2}^{n+1} a_{k}=\sum_{k=1}^{n} a_{k}^{2}-n \sum_{k=1}^{n} b_{k}+\varepsilon_{m}, or 1+2++n=12+22++n2nk=1nbk+εm1+2+\ldots+n=1^{2}+2^{2}+\ldots+n^{2}-n \sum_{k=1}^{n} b_{k}+\varepsilon_{m} whence nk=1nbk=n(n+1)(2n+1)6n(n+1)2+εm=n(n+1)(n1)3+εmn \sum_{k=1}^{n} b_{k}=\frac{n(n+1)(2 n+1)}{6}-\frac{n(n+1)}{2}+\varepsilon_{m}=\frac{n(n+1)(n-1)}{3}+\varepsilon_{m} Note that if nn is not divisible by 3 then the number n(n+1)(n1)3\frac{n(n+1)(n-1)}{3} is divisible by nn (since (n+1)(n1)3\frac{(n+1)(n-1)}{3} is integer). It follows that εmn\varepsilon_{m} \vdots n which is impossible. Hence nn is divisible by 3 and it follows that εm\varepsilon_{m} is divisible by the number n3\frac{n}{3}. The latter is possible only for n=3n=3 because εm=±1\varepsilon_{m}= \pm 1. It remains to verify that n=3n=3 satisfies the problem conditions. Indeed, let a1=1,a2=2,a3=3a_{1}=1, a_{2}=2, a_{3}=3. Then a12a2+1=03,a22a31=03a_{1}^{2}-a_{2}+1=0 \vdots 3, a_{2}^{2}-a_{3}-1=0 \vdots 3 and a32a1+1=93a_{3}^{2}-a_{1}+1=9 \vdots 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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.