Given integers $n$, $i$, and $j$ such that $i-j$ is relatively prime to $n$. Does it follow that either $i$ or $j$ is relatively prime to $n$?
2026-03-28 11:21:45.1774696905
On
If $\gcd(i-j, n) = 1$, does it follow that at least one of $\gcd(i,n)$ and $\gcd(j,n)$ is 1?
50 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
4
There are 4 best solutions below
0
On
You can generate infinitely many counterexamples by choosing distinct positive primes $p$ and $q$ (so they're both greater than 1). Then choose positive integer exponents $\alpha$ and $\beta$, set $i = p^\alpha$, $j = q^\beta$ and $n = pq$.
Obviously $\gcd(i, n) = p$ and $\gcd(j, n) = q$ and we've already stipulated $p > 1$ and $q > 1$.
But $i - j = p^\alpha - q^\beta$, and this is coprime to both $p$ and $q$, and therefore to $n$.
J. W. gave the example $p = 3$, $q = 2$, $\alpha = 2$, $\beta = 3$.
It's true iff $n>1$ is a prime power. For if $n$ is a prime power $p^k$ and it fails then $\,p\mid i,j\,$ so $\,p\mid i-j,\,$ contra $\,(n,i-j)=1.\,$ If $n$ is not a prime power then it has at least two prime factors so we can write $\,n = ij,\ i,j>1$ and $\,(i,j)=1\,$ so Stieltjes $\Rightarrow (n,i-j) = 1\,$ but $\,(n,i)=i>1,\,(n,j) =j > 1$.