1

Let $m$ and $n$ be coprime. By doing a few concrete examples, I see that the numbers $0,m,2m,3m,\dots,(n-1)m$ get mapped to the numbers $0,1,2,\dots,(n-1)$ in $\operatorname{mod}(n)$. How do I show that when going from $0$ to $(n-1)m \operatorname{mod}(n)$ we trace out the numbers $0\dots(n-1)$ (albeit likely by jumping about) without repeating?

Example: $m=4,n=9$, we get $0,4,8,3,7,2,6,1,5,$

Example $m=10,n=7$, we get $0,3,6,2,5,1,4$.

vitamin d
  • 5,783
matt
  • 876

2 Answers2

2

user has already written a good answer.

In this answer, I will add more details.

Suppose that there are integers $s,t$ such that $$0\leqslant s\lt t\lt n\qquad\text{and}\qquad sm\equiv tm\pmod n$$

Then, there is a positive integer $u$ such that

$$(t-s)m=un$$

Now, since $\gcd(m,n)=1$, there are integers $a,b$ such that $$am+bn=1$$

Multiplying the both sides by $(t-s)$ gives $$a(t-s)m+bn(t-s)=t-s,$$ i.e. $$aun+bn(t-s)=t-s,$$ i.e. $$n(au+b(t-s))=t-s$$

Since $n$ divides $(t-s)$, there is a positive integer $w$ such that $t-s=wn$.

Since $t=wn+s$, one has $$t\lt n\implies wn+s\lt n\implies n+s\leqslant wn+s\lt n\implies n+s\lt n\implies s\lt 0$$ which contradicts $s\geqslant 0$.

Therefore, for every pair $(s,t)$ such that $0\leqslant s\lt t\lt n$, $$sm\not\equiv tm\pmod n$$

mathlove
  • 139,939
1

Suppose that $\exists k\,, 0< k < n$ such that

$$k \cdot m \equiv 0 \pmod n$$

which can't be true by Euclid's lemma since $k<n$.

Then, assuming wlog $k_1\ge k_2$, suppose

$$k_1 \cdot m \equiv k_2 \cdot m \pmod n \iff(k_1-k_2)\cdot m \equiv 0\pmod n$$

which can be true only if $k_1=k_2$.

user
  • 154,566