Unofficial archive — problems, solutions & results © IMC, reproduced with permission.

IMC / 2022 / Problems / Day 2, P6

IMC 2022 · Day 2 · P6

hard

Let p>2p > 2 be a prime number. Prove that there is a permutation (x1,x2,,xp1)(x_1, x_2, \dots, x_{p-1}) of the numbers (1,2,,p1)(1, 2, \dots, p-1) such that x1x2+x2x3++xp2xp12(modp).x_1 x_2 + x_2 x_3 + \dots + x_{p-2} x_{p-1} \equiv 2 \pmod p. (proposed by Giorgi Arabidze, Tbilisi Free University, Georgia)

Solution 1 of 2 (official)

Hint:

We show such a permutation.

Let xii1(modp)x_i \equiv i^{-1} \pmod p for i=1,2,,p1i = 1, 2, \cdots, p-1. Then i=1p2xixi+1i=1p21i1i+1i=1p2(1i1i+1)11p1p2p12(modp)\sum_{i=1}^{p-2} x_i x_{i+1} \equiv \sum_{i=1}^{p-2} \frac{1}{i} \cdot \frac{1}{i+1} \equiv \sum_{i=1}^{p-2} \left( \frac{1}{i} - \frac{1}{i+1} \right) \equiv 1 - \frac{1}{p-1} \equiv \frac{p-2}{p-1} \equiv 2 \pmod p

Solution 2 of 2 (official)

We begin by noting that the identity permutation yields the value 12+23++(p2)(p1)=2(p3)0(modp)1 \cdot 2 + 2 \cdot 3 + \dots + (p-2)(p-1) = 2 \cdot \binom{p}{3} \equiv 0 \pmod p as soon as p>3p > 3. The idea now is to perturb that permutation to obtain the desired value 2.

One thing we can do is to replace (i,i+1,i+2,i+3)(i, i+1, i+2, i+3) by (i,i+2,i+1,i+3)(i, i+2, i+1, i+3). Indeed, this will decrease the sum by 3. So if p2(mod3)p \equiv 2 \pmod 3, we can just take the permutation (1,3,2,4,6,5,7,,p4,p2,p3,p1)(1, 3, 2, 4, 6, 5, 7, \dots, p-4, p-2, p-3, p-1) i.e. exchanging 3k13k - 1 and 3k3k whenever k=1,2,,p23k = 1, 2, \dots, \frac{p-2}{3}. This means we decrease the sum p23\frac{p-2}{3} times by 3, leading to a remaining sum of (p2)2(modp)-(p-2) \equiv 2 \pmod p.

If p1(mod3)p \equiv 1 \pmod 3, this strategy does not work immediately. Instead, we can change (1,2,3,4,5)(1, 2, 3, 4, 5) to (1,4,3,2,5)(1, 4, 3, 2, 5) resulting in a decrement of the sum by 8. If we then exchange 3k3k and 3k+13k + 1 for k=2,3,,p73k = 2, 3, \dots, \frac{p-7}{3} as before, we get another p103\frac{p-10}{3} times a decrement by 3, leading to a remaining sum of 8p10332(modp)-8 - \frac{p-10}{3} \cdot 3 \equiv 2 \pmod p.

Of course this only works if p13p \ge 13. It thus remains to consider the cases p=3p = 3 and p=7p = 7 by hand. For p=3p = 3, we just take (1,2)(1, 2) and for p=7p = 7 we can take (1,4,5,2,3,6)(1, 4, 5, 2, 3, 6).

How the field did

contestants scored
589
average (of 10)
3.11
solved (≥ 80%)
20.9%
near-0 (≤ 10%)
54.7%
discrimination
0.53

Score distribution (field cohort)

Computed on contestants with a meaningful total (field cohort); discrimination is the corrected item–total correlation.

Similar problems

IMC 2022 · Day 1 · P3very hardavg 2.3/10 · solved 12% · near-0 55% · disc 0.64
IMC 2016 · Day 2 · P8very hardavg 2.1/10 · solved 10% · near-0 62% · disc 0.38
IMC 2025 · Day 1 · P5killeravg 1.0/10 · solved 5% · near-0 79% · disc 0.49
IMC 2025 · Day 2 · P7mediumavg 5.5/10 · solved 39% · near-0 19% · disc 0.62