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$?
-
3Consider $\gcd(3-2,6)$ – robjohn Dec 11 '19 at 02:31
4 Answers
No. For example, $6$ is relatively prime to $3-2=1$, and $$\gcd(6,3),\,\gcd(6,2)>1.$$

- 4,582
- 2
- 18
- 44
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$.

- 14,663
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$.

- 272,048