Maths Olympiad Prep

Library / /170 of 520

Number theory Difficulty 6.1 National olympiad Prove it

Let pp be a prime number. Prove that it is possible to choose a permutation a1,a2,,apa_{1}, a_{2}, \ldots, a_{p} of 1,2,,p1,2, \ldots, p such that the numbers a1,a1a2,a1a2a3,,a1a2a3apa_{1}, a_{1} a_{2}, a_{1} a_{2} a_{3}, \ldots, a_{1} a_{2} a_{3} \cdots a_{p} all give different remainders when divided by pp.

Solution

Let bi=a1a2aib_{i}=a_{1} a_{2} \cdots a_{i}, for 1ip1 \leq i \leq p. We prove that it is possible to choose the permutation such that biimodpb_{i} \equiv i \bmod p for all ii. For i2i \geq 2, aibibi11modpa_{i} \equiv b_{i} \cdot b_{i-1}^{-1} \bmod p if bi1≢0modpb_{i-1} \not \equiv 0 \bmod p. We now choose a1=1a_{1}=1 and aii(i1)1modpa_{i} \equiv i \cdot(i-1)^{-1} \bmod p for 2ip2 \leq i \leq p. It is now sufficient to prove that ai≢1modpa_{i} \not \equiv 1 \bmod p for all 2ip2 \leq i \leq p and ai≢ajmodpa_{i} \not \equiv a_{j} \bmod p for all 2j<ip2 \leq j<i \leq p.
Assume for the sake of contradiction that ai1modpa_{i} \equiv 1 \bmod p for some 2ip2 \leq i \leq p. Then i(i1)11i \cdot(i-1)^{-1} \equiv 1 modp\bmod p, so ii1modpi \equiv i-1 \bmod p, so 01modp0 \equiv -1 \bmod p. Since p2p \geq 2, this is a contradiction. Now assume that aiajmodpa_{i} \equiv a_{j} \bmod p for some 2j<ip2 \leq j<i \leq p. Then i(i1)1j(j1)1i \cdot(i-1)^{-1} \equiv j \cdot(j-1)^{-1} modp\bmod p so i(j1)j(i1)modpi(j-1) \equiv j(i-1) \bmod p so ijiijjmodpij - i \equiv ij - j \bmod p so ijmodp-i \equiv -j \bmod p. But we had 2j<ip2 \leq j < i \leq p, so this cannot be.
We conclude that if we choose the aia_{i} as indicated above, all aia_{i} will be distinct, making it indeed a permutation of 1,2,,p1,2, \ldots, p. Furthermore, by definition, a1a2aiimodpa_{1} a_{2} \cdots a_{i} \equiv i \bmod p, so the second condition is also satisfied.

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.