Solve
$$3x \equiv 17 \pmod{2014}$$
So first I suppose $3^{-1} \pmod{2014}$
$2014 = 671(3) + 1 \implies 1 = 2014 - 671(3)$
But this gives $3^{-1} = 1 \pmod{2014}$
which is incorrect?
Solve
$$3x \equiv 17 \pmod{2014}$$
So first I suppose $3^{-1} \pmod{2014}$
$2014 = 671(3) + 1 \implies 1 = 2014 - 671(3)$
But this gives $3^{-1} = 1 \pmod{2014}$
which is incorrect?
$$3x=17\implies x=3^{-1}\cdot17 $$
Now, you can see at once that $\;2014=1\pmod 3\;$ , so
$$2\cdot2014+1=4029\implies 4029\div3=1343\implies 3^{-1}=1343\pmod{2014}$$
and thus
$$x=1343\cdot17\pmod{2014}=677\pmod{2014}$$
From Euclids, algorithm I get.
$$2014 = 3(671) + 1$$
Then $\implies 1 = 2014 - 3(671)$
So $3^{-1} \pmod{2014} = -671$
Then
$$3x \equiv 17 \pmod{2014}$$
$$x \equiv (17)(-671) \pmod{2014} \equiv -11407 \pmod{2014}$$
$$-11407 = 5(2014) - 1337 \equiv 677$$
– Amad27 Jan 25 '15 at 12:05$3^{-1}=-671\bmod 2014$, so the solution is $x=-671\times 17\bmod 2014$. You should get $677$ at the end.
Hint $\,\ {\rm mod}\,\ 3n\!+\!1\!:\,\ 3(-n)\equiv 1\,\Rightarrow\, 3^{-1}\equiv -n$
Alternatively $ $ note $\,\ \dfrac{1}{3} \,\equiv\, \dfrac{n}{3n}\,\equiv\, \dfrac{n}{-1}\equiv -n\ $ by Gauss's algorithm.
$3x=2014~k+17=3~\underbrace{(671~k+6)}_x+\underbrace{(k-1)}_0\quad=>\quad k=1~$ and $~x=677$.