DR.WANG Mathematics中文

2024 NZMO Round 2 · Question 4

Solutions (answers with justifications) are required for all problems, including those which ask for an answer.

Determine all positive integers nn less than 20242024 such that for all positive integers xx, the greatest common divisor of 9x+19x+1 and nx+1nx+1 is 11.

Show answer and methods 2 methods

Answer

The admissible values are n∈{6,8,10,12,18,36,90,252,738}n\in \{6,8,10,12,18,36,90,252,738\}.

Method 1 Test the prime divisors of the difference

First exclude n=9n=9: taking x=1x=1 gives two copies of 1010. For n≠9n\ne9, every common divisor of 9x+19x+1 and nx+1nx+1 divides n(9x+1)−9(nx+1)=n−9n(9x+1)-9(nx+1)=n-9. It also cannot be a multiple of 33, because 9x+1≡1(mod3)9x+1\equiv1\pmod3. Thus every nn with ∣n−9∣=3j|n-9|=3^j for an integer j≥0j\ge0 works.

Conversely, if ∣n−9∣|n-9| has a prime factor p≠3p\ne3, then 99 has a multiplicative inverse modulo pp. Choose a positive xx with x≡−9−1(modp)x\equiv-9^{-1}\pmod p. Then 9x+1≡0(modp)9x+1\equiv0\pmod p, and since n≡9(modp)n\equiv9\pmod p, also nx+1≡0(modp)nx+1\equiv0\pmod p. This nn fails.

The positive candidates below 20242024 are 9−1,9−39-1,9-3 and 9+1,9+3,9+9,9+27,9+81,9+243,9+7299+1,9+3,9+9,9+27,9+81,9+243,9+729. The next plus choice exceeds the limit, and 9−9=09-9=0.

Adapted from the solution by Ross Atkins · Published solution (external)

Method 2 Construct the largest possible gcd

Exclude n=9n=9 as x=1x=1 already fails. Write ∣n−9∣=3jm|n-9|=3^j m with 3∤m3\nmid m. Since gcd⁡(9x+1,x)=1\gcd(9x+1,x)=1 and 3∤(9x+1)3\nmid(9x+1), the Euclidean algorithm gives gcd⁡(9x+1,nx+1)=gcd⁡(9x+1,(n−9)x)=gcd⁡(9x+1,m)\gcd(9x+1,nx+1)=\gcd(9x+1,(n-9)x)=\gcd(9x+1,m). Every possible gcd thus divides mm.

If m>1m>1, Euler’s theorem modulo 99 gives m6≡1(mod9)m^6\equiv1\pmod9, because φ(9)=6\varphi(9)=6. The choice x=(m6−1)/9x=(m^6-1)/9 is a positive integer with 9x+1=m69x+1=m^6. It realizes the largest possible gcd, namely mm. When m=1m=1, the gcd identity already gives 11 for every xx.

Thus the condition is precisely m=1m=1, or n=9±3jn=9\pm3^j. Taking 0<n<20240<n<2024 gives the nine values in the answer.