Finding an inverse modulo $m$

106 Views Asked by At

I know that for $m \in \mathbb{Z}$ then $a$ has an inverse modulo $m$ if and only if $\gcd(a,m) = 1$ meaning $a$ and $m$ are relatively prime and their greatest common divisor is 1

Prove that for all integers $n>1$, the number $n-1$ has an inverse modulo $n$. Thank you

1

There are 1 best solutions below

0
On

From the question you wrote, it seems like you already know a potential plan to solve this problem: simply prove $\gcd(n-1, n) = 1$.

This works. Do it. (you should have tried it even without the reassurance that it works!)