How to solve $ 13x \equiv 1 ~ (\text{mod} ~ 17) $? 
How to solve $ 13x \equiv 1 ~ (\text{mod} ~ 17) $?

Please give me some ideas. Thank you.

$$\frac{17}{13}=1+\frac4{13}=1+\frac1{\frac{13}4}=1+\frac1{3+\frac14}$$
The last but one convergent of $\frac{17}{13}$ is $1+\frac13=\frac43$
Using the relationship of the successive convergents of a continued fraction, $17\cdot3-13\cdot4=-1\implies 13\cdot4\equiv1\pmod{17}\implies x\equiv4\pmod{17}$
