Find the inverse of 17 mod 41 Questions
(1) Find the inverse of $17 \mod 41$.
(2) Find the smallest positive number n so that $17n \equiv 14 \pmod{41}$

For the first question, my attempt is as follows:
$$41-17\cdot2=7$$
$$17-7\cdot2=3$$
$$7-3\cdot2=1$$
$$7-2(17-7\cdot2)=1$$
$$7-2\cdot17=1$$
$$41-17\cdot2-2\cdot17=1$$
$$41-4\cdot17=1$$
So the inverse of $17$ is $-4$.
That is, the inverse of $17$ is $37$
Am I right?

Modular inverses can be rotely computed by the extended Euclidean algorithm, as well as other less-known methods methods that are sometimes simpler for small numbers. A few are below.
Fiirst we consider Gauss's algorithm, which scales the (top & bottom) of the fraction to make the bottom smaller when reduced mod $41$, e.g. $\,2\cdot 17\equiv -7\,$ below (all congruences are mod $41)$

Gauss's algorithm: $\,\  \color{#0a0}{\dfrac{1}{17}}\equiv \dfrac{2}{34}\equiv \dfrac{2}{-7}\equiv \dfrac{-12}{42}\equiv \dfrac{\color{#c00}{-12}}1$

Ext. Euclid in fractions: $\,\  \dfrac{1}{17}\equiv \dfrac{-2}{7}\equiv \dfrac{5}3\equiv\dfrac{\color{#c00}{-12}}1$

Factoring: $\,\ \color{#0a0}{\color{#0a0}{\dfrac{1}{17}}}\equiv \dfrac{42}{17}\equiv 6\cdot \dfrac{7}{17}\equiv 6\cdot\dfrac{-34}{17}\equiv 6(-2)\equiv\color{#c00}{-12}$

Therefore $\ 17x \equiv 14\,\Rightarrow\, x\equiv (\color{#0a0}{1/17})14 \equiv(\color{#c00}{-12})14\equiv -4(3\cdot 14)\equiv -4$

Alternatively we can compute $\,14/17\,$ directly using factoring as above
namely $\,\ {\rm mod}\ 41\!:\,\ \dfrac{14}{17}\equiv 2\cdot \dfrac{7}{17}\equiv 2\cdot\dfrac{-34}{17}\equiv 2(-2)\equiv -4$

Beware $ $ Modular fraction arithmetic is valid only for fractions with denominator coprime to the modulus. See here for further discussion.  
