Find the multiplicative inverses of the following:
(a) $6 \pmod {13}$
(b) $5 \pmod {6}$
(c) $12 \pmod {17}$
(d) $16 \pmod {17}$
(e) $9 \pmod {101}$
(f) $n + 1 \pmod {n}$
The multiplicative inverse of $a$ modulo $n$ is the unique solution $x \pmod n$ of $ax \equiv 1 \pmod n$.
(a) $6x \equiv 1 \pmod {13}$ is the equation we want to solve.
$g = \gcd(13, 6)=1$ and $g \mid 1$ so there is a unique solution.
By inspection $x=11$ is a solution, so the general solution is $$ x \equiv 11 \pmod {13} $$
(b) $5x \equiv 1 \pmod 6$ is the equation to solve.
$g = \gcd(6,5) =1$ and $g \mid 1$ so there is a unique solution.
By inspection $x=5$ is a solution, so the general solution is $$ x \equiv 5 \pmod 6 $$
(c) $12x \equiv 1 \pmod {17}$ is the equation to solve.
$g = \gcd(17,12) =1$ and $g \mid 1$ so there is a unique solution.
By inspection $x=10$ is a solution, so the general solution is $$ x \equiv 10 \pmod {17} $$
(d) $16x \equiv 1 \pmod {17}$ is the equation to solve.
$g = \gcd(17,16) =1$ and $g \mid 1$ so there is a unique solution.
By inspection $x=16$ is a solution, so the general solution is $$ x \equiv 16 \pmod {17} $$
(e) $9x \equiv 1 \pmod {101}$ is the equation to solve.
$g = \gcd(101,9) =1$ and $g \mid 1$ so there is a unique solution.
$9x \equiv 1 \pmod {101}$ means $x = \frac{101k + 1}{9}$ for some integer $k$. For $x$ to be an integer, $101k + 1$ must be a multiple of nine. A guess is $101k+1 =405$, and so $k=4$, which gives $x=45$. So the general solution is $$x \equiv 45 \pmod {101}$.
(f) $(n+1) x \equiv 1 \pmod n$ is the equation to solve.
$g = \gcd(n,n+1) =1$ and $g \mid 1$ so there is a unique solution.
By inspection $x=1$ is a solution, so the general solution is $$ x \equiv 1 \pmod n $$
Just for fun, let's check this with $x=n+1$. We have $(n+1)(n+1) = n^2 + 2n +1 \equiv 1 \pmod n$, as expected.