Maths Olympiad Prep

Library / Estonija /20 of 32

Estonija, 2010

Number theory Difficulty 5.8 AIME, harder Prove it Estonia

For arbitrary positive integers a,ba, b, denote a⊖b=a−bgcd(a,b)a \ominus b = \frac{a-b}{\text{gcd}(a,b)}.
Let nn be a positive integer. Prove that the following conditions are equivalent:
(i) gcd(n,n⊖m)=1\text{gcd}(n, n \ominus m) = 1 for every positive integer m<nm < n;
(ii) n=pkn = p^k where pp is a prime number and kk is a non-negative integer.

Solution

Note at first that da⊖db=a⊖bda \ominus db = a \ominus b for all positive integers a,ba, b, and dd. Indeed,
da⊖db=da−dbgcd(da,db)=d⋅(a−b)d⋅gcd(a,b)=a−bgcd(a,b)=a⊖b. da \ominus db = \frac{da - db}{\text{gcd}(da, db)} = \frac{d \cdot (a-b)}{d \cdot \text{gcd}(a,b)} = \frac{a-b}{\text{gcd}(a,b)} = a \ominus b.
Show now that if nn is a prime power and m<nm < n, then n⊖mn \ominus m is relatively prime to nn. Indeed, let n=pkn = p^k where pp is a prime number, and let m=pism = p^i s where gcd(p,s)=1\text{gcd}(p, s) = 1. Then m<nm < n implies i<ki < k. Now
n⊖m=pk−i⊖s=pk−i−sgcd(pk−i,s)=pk−i−s n \ominus m = p^{k-i} \ominus s = \frac{p^{k-i} - s}{\text{gcd}(p^{k-i}, s)} = p^{k-i} - s
because gcd(pk−i,s)=1\text{gcd}(p^{k-i}, s) = 1 by the choice of ss. Also, for the same reason, gcd(p,pk−i−s)=1\text{gcd}(p, p^{k-i} - s) = 1, hence gcd(n,n⊖m)=gcd(pk,pk−i−s)=1\text{gcd}(n, n \ominus m) = \text{gcd}(p^k, p^{k-i} - s) = 1.
It remains to show that if nn is not a prime power, then there exists a positive integer mm such that m<nm < n and the integers n⊖mn \ominus m and nn share a common prime factor. Since nn is not a prime power, it has at least two different prime factors. Let pp and qq be some prime factors of nn, whereby p<qp < q. Let n=pktn = p^k t where gcd(p,t)=1\text{gcd}(p, t) = 1. Take m=n−pk+1m = n - p^{k+1}. As nn is divisible by both pkp^k and qq which are relatively prime, it is also divisible by their product pkqp^k q. Consequently, pk+1<pkq≤np^{k+1} < p^k q \le n, i.e., 0<m<n0 < m < n. Now
n⊖m=n⊖(n−pk+1)=t⊖(t−p)=t−(t−p)gcd(t,t−p)=pgcd(t,p)=p n \ominus m = n \ominus (n - p^{k+1}) = t \ominus (t - p) = \frac{t - (t-p)}{\text{gcd}(t, t-p)} = \frac{p}{\text{gcd}(t, p)} = p
since gcd(t,p)=1\text{gcd}(t, p) = 1. We see that n⊖mn \ominus m and nn have a common prime factor pp.

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.