1

Find $17^{341}\mod 5$.

I know this has to be solved using the Chinese Theorem or Fermat's Little Theorem, $341$ is a Poulet number, and the result equals $2$. But how can I prove this? I'm fairly new to modular arithmetic.

  • $17\equiv 2\pmod 5$ and $(2^4)\equiv 1 \pmod 5$ (by FLT) and $341\equiv 1 \pmod 4$ so $341= 4k + 1$ for some $k$ (actually $k = 85$) so $17^{341}\equiv 2^{4k+1}\equiv (2^4)^k2\equiv 1^k2 \equiv 2 \pmod 5$. That's all. Straightforward and so long as $b$ and $n$ are relatively prime solving $b^M\pmod n$ this way will always work. An if $b,n$ aren't relatively dividing $n$ into pieces and using CRT will work.. – fleablood Aug 23 '20 at 20:58

5 Answers5

3

For any number $a$ coprime to $5$, a direct consequence of lil' Fermat is that $$a^n\equiv a^{n\bmod \varphi(5)}\equiv a^{n\bmod 4}\mod 5.$$ Here $17\equiv 2\bmod 5\:$ and $\:341\equiv 1\bmod 4$, hence $$17^{341}\equiv 2 \mod 5.$$

Bernard
  • 175,478
1

First, you note that $17\equiv2\pmod 5$. So you need to calculate $2^{341}\pmod5$. Then you note that $2^4\equiv 1\pmod 5$. Now $341=340+1=85\times 4+1$. Then $$ 17^{341}\equiv2^{4\times 85+1}=(2^4)^{85}\,2\equiv 1^{85}\,2=2\pmod5. $$

Martin Argerami
  • 205,756
0

$$17^{341} = (17^2)^{170} \times 17 = 189^{170} \times 17$$

So modulo $5$, you have $$17^{341} \equiv (-1)^{170} \times 2 \equiv 2 \quad [5]$$

TheSilverDoe
  • 29,720
0

As per Fermat's Little Theorem, as $5$ is prime and $5\not\mid 17$ then $ 17^4=17^{5-1}\equiv 1\pmod 5$. Thus, $17^{341}=17^{4\cdot 85+1}=(17^4)^{85}\cdot 17\equiv 1^{85}\cdot 17=17\equiv 2\pmod 5$.

0

Just to be ever so slightly different, let's just use Fermat's little theorem in the form $a^p\equiv a$ mod $p$ for primes $p$, and note that

$$341=2\cdot125+3\cdot25+3\cdot5+1$$

so that

$$17^{341}\equiv17^2\cdot17^3\cdot17^3\cdot17=17^9=17^5\cdot17^4\equiv17\cdot17^4=17^5\equiv17\equiv2\mod5$$

(e.g., $a^{2\cdot125}=(((a^2)^5)^5)^5\equiv((a^2)^5)^5\equiv(a^2)^5\equiv a^2$, invoking Fermat repeatedly).

Barry Cipra
  • 79,832