I have difficulty interpreting the following: Determine all integers $n$ such that 2 has an inverse under multiplication modulo $n$.
So far I interpret this as: $2\times\frac{1}{n}=$ mod $(n)$, but what does this mean?
I have difficulty interpreting the following: Determine all integers $n$ such that 2 has an inverse under multiplication modulo $n$.
So far I interpret this as: $2\times\frac{1}{n}=$ mod $(n)$, but what does this mean?
Hint $\ \exists x\!:\ 2x \equiv 1\pmod{n}\iff \exists x,k\!:\ 2x-kn = 1\iff \gcd(2,n)=1\ $ by Bezout
Update: Bezout is unknown. Instead: $ $ if $\,n\,$ has a inverse then $\,nk = 2x-1\,$ is odd, so $\,n\,$ is odd. Conversely, if $\,n\,$ is odd then $\,n = 2x-1,\,$ so $\,2x\equiv 1\pmod{n},\,$ so $\,n\,$ has inverse $\,x.$ Combining both directions we conclude that $\,2\,$ is invertible mod $\,n\iff n$ is odd $\iff \gcd(2,n)=1.\,$
Remark $ $ Generally $\,a\,$ is invertible mod $n\iff \gcd(a,n)=1,\,$ with similar proof.