1

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?

Amad27
  • 10,465

4 Answers4

2

$$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}$$

Timbuc
  • 34,191
  • (+1) Sir! But why are you doing $2\cdot 2014 + 1$ ?? – Amad27 Jan 25 '15 at 11:54
  • No but I got, $3^{-1} = 1 \pmod{2014}$? ??? – Amad27 Jan 25 '15 at 11:55
  • Because since $;2014=1\pmod 3;$ , then $;2\cdot2014=2\pmod 3;$ , and then $;2\cdot2014+1=0\pmod 3;$ – Timbuc Jan 25 '15 at 11:59
  • @Amad27 That is obviously wrong, right?! $;x^{-1}=1\pmod m\iff x=1\pmod m;$ , for any integer $;m;$ and coprime $;x;$ ! – Timbuc Jan 25 '15 at 12:00
  • Wait, so let me ask. What is $3^{-1} \pmod{2014}$ ? – Amad27 Jan 25 '15 at 12:00
  • @Amad27 $;3^{-1}=t\pmod{2014}\iff 3t=1\pmod{2014};$ . As shown above, we get $;3^{-1}=1343\pmod{2104};$ . – Timbuc Jan 25 '15 at 12:02
  • Here it is:

    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
  • @Amad27 Yes, that is correct . Observe that $;1343=-671\pmod{2104};$ and thus we get the same ! – Timbuc Jan 25 '15 at 12:07
  • Except the sign though. There must be something wrong there. – Amad27 Jan 25 '15 at 12:49
  • @Amad27 You've already asked quite a few question about modular arithmetic. I think you're lacking some basic understanding of this subject, and I think it'd be good for you to go the basics again before you attempt to go on anymore. In this case, we have that $;-671\pmod{2014};$ is exactly the same as $;1343\pmod{2014};$ , so I don't understand what you say about "except the sign"! The sign doesn't really matter here. We also have that $;3=-3=-18=12\pmod 3;$ , or $;4=-3=11=-31\pmod 7;$ , and etc. – Timbuc Jan 25 '15 at 13:18
  • I meant the answer is suppose to be $x \equiv 677$ not $-677$ – Amad27 Jan 25 '15 at 15:12
1

$3^{-1}=-671\bmod 2014$, so the solution is $x=-671\times 17\bmod 2014$. You should get $677$ at the end.

Bernard
  • 175,478
0

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.

Bill Dubuque
  • 272,048
0

$3x=2014~k+17=3~\underbrace{(671~k+6)}_x+\underbrace{(k-1)}_0\quad=>\quad k=1~$ and $~x=677$.

Lucian
  • 48,334
  • 2
  • 83
  • 154