Solving $217 x \equiv 1 \quad \text{(mod 221)}$ I am given the problem:
Find an integer $x$ between $0$ and $221$ such that
$$217 x \equiv 1 \quad \text{(mod 221)}$$
How do I solve this? Unfortunately I am lost.

Hint $\ {\rm\ mod}\,\ 221\!:\quad\ \dfrac{1}{217}\equiv\dfrac{-220}{-4}\equiv 55$
${\rm mod}\,\ 4n\!+\!1\!:\ \ \dfrac{1}{4n\!+\!1\!-\!4}\equiv \dfrac{-4n}{-4}\equiv n\quad $  [above is case $\,n = 55$]
${\rm mod}\,\ an\!+\!1\!:\,\ \dfrac{1}{an\!+\!1\!-\!a}\equiv \dfrac{-an}{-a}\equiv n\quad $ [above is case $\,a=4$]
i.e. $\ \ \  an\!+\!1\equiv 0\,\Rightarrow\, (-a)n\equiv 1\ \Rightarrow\  n \equiv \dfrac{1}{-a\ }\equiv \dfrac{1}{-a + k(an\!+\!1)}$
