1

I want to find

$$ 5^{133} \mod 8. $$ I have noticed that $5^n \mod 8 = 5$ when $n$ is uneven and 1 otherwise, which would lead me to say that $5^{133} \mod 8 = 5$ But I don't know how to prove this. How can I prove that this is the case (or find another solution if it is not)?

Sandi
  • 387

2 Answers2

6

First of all it is easy to see that $5^2\equiv 1$ (mod $8$). We also know that $133=66\times 2+1$. Hence

$5^{133}\equiv 5^{2\times 66+1}\equiv 5\times (5^2)^{66}\equiv 5\times 1^{66}\equiv 5$ (mod $8$).

J. W. Tanner
  • 60,406
Mark
  • 39,605
  • Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too? – Sandi Feb 17 '19 at 22:33
  • 1
    Yes, you can also write regular equality there. But if two numbers are equal in $\mathbb{Z}$ then they are also congruent mod $n$ for any $n\in\mathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning. – Mark Feb 17 '19 at 22:36
  • I don't understand how you do the step $5 \times (5^2)^{66} \equiv 5 \times 1^{66} (\mathrm{mod} 8)$. Could you clarify please? – Sandi Feb 17 '19 at 22:42
  • 1
    $5^2\equiv 1$(mod $8$), hence $(5^2)^{66}\equiv 1^{66}\equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $a\equiv b$(mod $n$) and $c\equiv d$(mod $n$) then $ab\equiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$) – Mark Feb 17 '19 at 22:44
  • I found a similar thing in my book, but it said that $ac \equiv bd (modn)$. Did you make a typo or is it a different theorem? – Sandi Feb 17 '19 at 22:59
  • @Sandi oh yes, of course it is $ac\equiv bd$(mod $n$). Was a typo, sorry. – Mark Feb 17 '19 at 23:00
0

"Highbrow method":

If you undertake to learn any number theory , there is Euler's theorem: $$a^{\varphi (n)}\cong1\pmod n$$, for $a$ relatively prime to $n$.

($\varphi$ is Euler's totient function, and just returns the number of positive integers less than $n$ that are relatively prime to $n$.)

Now $\varphi (8)=4$. Hence $5^4\cong1\pmod8.$

Use this to reduce the exponent: $133=4×33+1\implies5^{133}=(5^4)^{33}\cdot 5\cong5\pmod8$.