Tuesday, June 7, 2016

modular arithmetic - How can one calculate $342342^{1001}$ mod $5$?



How can one calculate $342343^2$ mod $3$? I know that the answer is $1$.



And $342342^{1001}$ mod $5$.



I know that



$
3^0 \mod 5 = 1 \\

3^1 \mod 5 = 3 \\
3^2 \mod 5 = 4 \\
3^3 \mod 5 = 2 \\\\
3^4 \mod 5 = 1 \\
3^5 \mod 5 = 3 \\
3^6 \mod 5 = 4 \\
$



So 1001 = 250 + 250 + 250 + 250 + 1, which is why the answer is also 1?


Answer




First, Note that
$$342342 = 34234*10+2= 34234*2*5 +2$$
So you have
$$342342 \equiv 2 \pmod 5$$



Then, remember that
$$\forall a,b,c,n \in \mathbb N, a \equiv b \pmod n \implies a^c \equiv b^c \pmod n$$



Therefore,
$$342342^{1001} \equiv 2^{1001} \pmod 5$$




Finaly, note that $1001 = 1000+1 = 4*250 +1$ and try to conclude


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...