Maths Olympiad Prep

Library / EGMO /18 of 22

EGMO

Number theory Difficulty 8.0 Shortlist Prove it European Girls' Mathematical Olympiad (EGMO)

Problem:
For a positive integer NN, let c1<c2<⋯<cmc_{1} < c_{2} < \dots < c_{m} be all the positive integers smaller than NN that are coprime to NN. Find all N≥3N \geq 3 such that
gcd(N,ci+ci+1)≠1 gcd (N, c_{i} + c_{i + 1}) \neq 1
for all 1≤i≤m−11 \leq i \leq m - 1.
Here gcd⁡(a,b)\gcd(a, b) is the largest positive integer that divides both aa and bb. Integers aa and bb are coprime if gcd⁡(a,b)=1\gcd(a, b) = 1.

Solutions — 2

Solution 1

Solution:
The answer is all even integers and all powers of 33. First we show that these work.

- When NN is even, all cic_{i} are odd, and so 2∣gcd⁡(N,ci+ci+1)2 \mid \gcd (N, c_{i} + c_{i + 1}) for every ii.

- When NN is a power of 33, the cic_{i} are exactly the numbers in the range 1,2,…,N−11, 2, \ldots, N - 1 that are not divisible by 33. So, the sequence c1,…,cmc_{1}, \ldots, c_{m} alternates between numbers congruent to 11 (mod 33) and 22 (mod 33). Thus 3∣gcd⁡(N,ci+ci+1)3 \mid \gcd (N, c_{i} + c_{i + 1}) for every ii.

Now we show that no other positive integer works. For the sake of contradiction, consider an odd candidate NN that is not a power of 33, and suppose it satisfies the problem condition. Then, since c1=1c_{1} = 1 and c2=2c_{2} = 2, we have gcd⁡(N,1+2)≠1\gcd (N, 1 + 2) \neq 1, so 3∣N3 \mid N. Thus, we can write NN as 3kM3^{k} M, where k≥1k \geq 1 and gcd⁡(M,6)=1\gcd (M, 6) = 1. We have M≥5M \geq 5 (as M≠1M \neq 1 by assumption) and M+2<NM + 2 < N.

We now split into two cases based on MM modulo 33.

Case 1. M≡1M \equiv 1 (mod 33).
As 3∣M−13 \mid M - 1 and M∣MM \mid M, neither M−1M - 1 nor MM are in the sequence {ci}\{c_{i}\}. As MM is odd and M≡1M \equiv 1 (mod 33), M−2M - 2 and M+1M + 1 are congruent to 11 (mod 33), are coprime to MM, and are smaller than NN. Thus, both M−2M - 2 and M+1M + 1 are in the sequence, and they are consecutive terms. However, this means gcd⁡(N,2M−1)≠1\gcd (N, 2M - 1) \neq 1. This gives a contradiction, as both 33 and MM are coprime to 2M−12M - 1.

Case 2. M≡2M \equiv 2 (mod 33).
This case is similar to Case 1. Neither MM nor M+1M + 1 are in the sequence, but M−1M - 1 and M+2M + 2 are. We obtain a similar contradiction from gcd⁡(N,2M+1)≠1\gcd (N, 2M + 1) \neq 1.

Solution 2

Solution:
We give an alternative way to show that any odd NN has to be the power of 33. Suppose for contradiction that NN has at least 22 distinct prime factors. Choose integers a,b>1a, b > 1 such that
ab∣Nab \mid N
- aa and bb are coprime;
- Every prime divisor of NN divides abab.

We use the Chinese Remainder Theorem, to find an integer n∈[1,ab]n \in [1, ab] such that
{n≡1(moda),n≡2(modb). \left\{ \begin{array}{ll} n \equiv 1 \pmod{a}, \\ n \equiv 2 \pmod{b}. \end{array} \right.
We claim that there is an index ii such that ci=n−3c_{i} = n - 3 and ci+1=nc_{i + 1} = n. Indeed, we note the following:

- nn is consecutive to a multiple of aa, so gcd⁡(a,n)=1\gcd(a, n) = 1. In a similar way we get that gcd⁡(b,n−3)=1\gcd(b, n - 3) = 1.
- nn is 22 away from a multiple of bb, therefore as 2∤b2 \nmid b, gcd⁡(b,n)=1\gcd(b, n) = 1. In a similar way we get that gcd⁡(a,n−3)=1\gcd(a, n - 3) = 1.
- n≤ab≤Nn \leq ab \leq N and n−3≥(a+1)−3>0n - 3 \geq (a + 1) - 3 > 0 as a>2a > 2.

This implies that nn and n−3n - 3 are coprime with NN, whereas neither n−2n - 2 nor n−1n - 1 are coprime with NN, which proves our claim. Finally, we claim that ci+ci+1=(n−3)+n=2n−3c_{i} + c_{i + 1} = (n - 3) + n = 2n - 3 is coprime with NN. Indeed we have 2n−3≡−1(moda)2n - 3 \equiv -1 \pmod{a} and 2n−3≡1(modb)2n - 3 \equiv 1 \pmod{b}. This implies that NN is a prime power.

When NN is odd, since c1=1c_{1} = 1 and c2=2c_{2} = 2, we have gcd⁡(N,1+2)≠1\gcd(N, 1 + 2) \neq 1, so 3∣N3 \mid N, which implies that NN is necessarily a power of 33. This concludes our proof.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.