2

Find $ \ \ 8^{504} \equiv \pmod 5 $

Answer:

$ 8^{504} \equiv 2^{1512} \pmod 5 $

Now ,

$$ \begin{align}2^4 &\equiv 1 \pmod 5 \\\text{or, } \left(2^{4}\right)^{378} &\equiv 1^{378} \pmod 5 \\ \text{or, } 2^{1512} &\equiv 1 \pmod 5\\\text{or, } 8^{504} &\equiv \ 1 \pmod 5 \end{align}$$

Am I right ?

MAS
  • 10,638

4 Answers4

2

Perhaps a slightly faster way to see it: Note that 504 is divisible by 4 and that Fermat's little theorem gives $$ a^4\cong1\mod 5 $$ for any $a\in \mathbb{Z}$ not divisible by 5.

So $$ 8^{504}=(8^4)^{126}\cong1^{126}\mod 5\cong1\mod 5 $$

operatorerror
  • 29,103
2

As $gcd(8,5)=1$ so by Euler's theorem $8^4\equiv 1\pmod5$ as $\phi (5)=4$ Now 504 divide by 4 so $8^{504}\equiv 1\pmod 5$

RAM_3R
  • 1,256
1

You are right!

Using $2^4=16$ solves your problem.

In my opinion, it's better to use $8^2=64$.

1

Following is using binomial theorem:

$$8^{504} = (65-1)^{252} = 1+65k$$

So the remainder is $1$.

I am sorry but I don't know about your method! :)

akhmeteni
  • 671