3

For abstract algebra I have to find the last two digits of $27^{2018}$, without the use of a calculator, and as a hint it says you should work in $\mathbb{Z}/100\mathbb{Z}$.

I thought breaking up the problem into $\mod(100)$ arguments. Thus: $27^{2}=729\equiv 29 \mod (100)$, and

$27^{4}=(27^{2})^{2} \equiv 29^{2}=861\equiv 61 \mod (100)$ and

$27^{8}=(27^{4})^{2} \equiv 61^{2}=3421 \equiv 21 \mod(100)$ and so on until I would find something that repeated itself. But I've done quite some terms no and I've not seen any iteration yet. So I'm thinking this is the wrong way.

Any suggestions?

7 Answers7

4

$\phi(100)=40$, so we can reduce the exponent mod $40$: $$ 27^{2018}\equiv27^{18}\pmod{100} $$ Then we can square and multiply: $$ \begin{align} 27^2&\equiv29\\ 27^4&\equiv41\\ 27^8&\equiv81\\ 27^9&\equiv87\\ 27^{18}&\equiv69\pmod{100} \end{align} $$

robjohn
  • 345,667
  • Very clear and seems like a way faster method than I was using. Thanks. – Mathbeginner Mar 17 '19 at 21:57
  • @Mathbeginner The fastest way is probably via the Binomial Theorem, e.g. see my answer ($10$ seconds of very trivial mental arithmetic) – Bill Dubuque Mar 18 '19 at 02:34
  • @BillDubuque: works nicely because $3^2\equiv-1\pmod{10}$. It may not generalize to other bases than $3$. – robjohn Mar 18 '19 at 02:50
  • @Rob Indeed, but such exercises are usually designed to have a nice solution by hand. – Bill Dubuque Mar 18 '19 at 02:57
  • Is the downvote due to a problem or question with this answer? I think the square and multiply algorithm after reducing the exponent by the totient of the modulus is a decent and fairly algorithmic approach to this type of question. – robjohn Mar 19 '19 at 19:03
  • I don't see any problem. In case you might not know, there are at least a handful of users who don't like such questions, so perhaps they may use such votes to try to discourage folks who answer them (I occasionally get such votes too). – Bill Dubuque Mar 20 '19 at 19:48
  • @BillDubuque: I understand that, but those are usually for questions with no effort shown, and this question shows the attempt made. Because mine was the only answer downvoted, I was thinking it might be something other than just the question. – robjohn Mar 20 '19 at 20:26
  • Btw, to clarify, "such questions" above doesn't refer to general "low quality" questions but, rather, to questions on modular exponentiation. A few users have expressed opinions that most such questions should be closed as dupes of a generic "abstract dupe" thread. Further some think answering such questions is based purely on rep-hunting. As I've mentioned elsewhere, I disagree in general (though I might agree that some specific cases are dupes). – Bill Dubuque Mar 20 '19 at 22:35
2

$27^{5} = 7 \quad (\mathrm{mod} \text{ } 100)$.

So $27^{2018} = 27^{403 \times 5 + 3} = 7^{403} \times 27^3 \quad(\mathrm{mod} \text{ } 100)$.

Now $7^4 = 1 \quad (\mathrm{mod} \text{ } 100)$. So $27^{2018} = 7^{4 \times 100 + 3} \times 27^3 = 7^3 \times 27^3$.

And $7 \times 27 = 189 = -11 \quad (\mathrm{mod} \text{ } 100)$. So $(7 \times 27)^3 = - 11^3 = 69 \quad (\mathrm{mod} \text{ } 100)$. You get finally $$27^{2018} = 69 \quad (\mathrm{mod} \text{ } 100)$$

TheSilverDoe
  • 29,720
2

$\bmod 100\!:\,\ 3^{\large 3\cdot 2018}\!\equiv 9^{\large 3027}\!\equiv\underbrace{(-1\!+\!10)^{\large 3027}\!\equiv -1 +\! \overbrace{3027}^{\large \color{#c00}{7}+10j}(\color{#c00}{10})}_{\rm Binomial\ Theorem\ }\equiv -1+\color{#c00}{70}\equiv 69$

Bill Dubuque
  • 272,048
1

You could use the Chinese remainder theorem and do the problem inside $\mathbb{Z}/25\mathbb{Z}$ and $\mathbb{Z}/4\mathbb{Z}$ separately. $27$ has order $20$ in $\mathbb{Z}/25\mathbb{Z}$ and order 2 in $\mathbb{Z}/4\mathbb{Z}$. We have $27^{2018} = 27^{18} = 19 \pmod{25}$ and $27^{2018} = 1 \pmod{4}$, so $27^{2018} = 69 \pmod{100}$.

user555203
  • 3,367
  • how do you see so quickly that $27$ has order $20$ in $\mathbb{Z}/25\mathbb{Z}$? – Mathbeginner Mar 17 '19 at 20:48
  • $2^{10} = 1024 = 24 = -1 \pmod{25}$. Or just compute the powers of $2$ mod $25$. Since $25$ is considerably smaller than $100$, it's much easier than what you were doing. – user555203 Mar 17 '19 at 20:49
  • I do see how $27$ has order $2$ in $\mathbb{Z}/4\mathbb{Z}$ since $729 \equiv 1 \mod (4)$ but I still don't see how what you're saying about $2^{10}$ is related to $27$ in $\mathbb{Z}/25\mathbb{Z}$... Sorry for the lack of insight. – Mathbeginner Mar 17 '19 at 21:00
  • You can reduce modulo $4$ (or $25$) before squaring (or doing any other arithmetic), and that's essentially why using the CRT is useful here. $27 = 3 \ne 1$ in $\mathbb{Z}/4\mathbb{Z}$, and $3^2 = 1$. That's exactly what it means to have order $2$. Similarly, in $\mathbb{Z}/25\mathbb{Z}$, we have $27 = 2$. And $2^{10} = 1024$. And $1024 = 24 = -1 \ne 1$ in $\mathbb{Z}/25\mathbb{Z}$. And $2^{20} = (2^{10})^2 = (-1)^2 = 1$. That's what it means to have order $20$. – user555203 Mar 17 '19 at 22:34
1

Because $\varphi(100)=40$ certainly the sequence of powers of $27$ will repeat after $40$ terms. A quick calculation shows that in fact it already repeats after $20$ terms. You could also use the Chinese remainder theorem to reduce the problem to computing $27^{2018}$ mod $25$ and mod $4$.

Servaes
  • 63,261
  • 7
  • 75
  • 163
1

As $27=3^3,N=27^{2018}=3^{3\cdot2018}$

Using http://mathworld.wolfram.com/CarmichaelFunction.html, $\lambda(100)=20$

As $(3,100)=1,6054\equiv14\pmod{20},$

$N\equiv3^{14}\pmod{100}$

Now $3^{14}=9^7=-(1-10)^7\equiv-1+\binom71\cdot10^1\pmod{100}$

See also: Last 3 digits of $3^{999}$ Determine the last two digits of $3^{3^{100}}$

1

Working in the multiplicative group of integers modulo $100$, $(\Bbb Z /100 \Bbb Z)^\times$, you can discover all that is needed to solve the problem with elementary algebra.

If $n$ is an integer denote by $[n]$ its $\text{modulo-}100$ residue class in ${\displaystyle \mathbb {Z} /100 \mathbb {Z}}$.

Exercise 1: The subset $\mathcal V = \bigr\{[20n+d]\mid n \in \Bbb Z \land d \in \{1,3,7,9\}\bigr\}$ of ${\displaystyle \mathbb {Z} /100 \mathbb {Z}}$ is actually a subset of $(\Bbb Z /100 \Bbb Z)^\times$, forming a subgroup with $20$ elements.

Since $[27] \in \mathcal V$, $\,27^{20} \equiv 1 \pmod{100}$.

To solve $27x \equiv 1 \pmod{100}$, observe that $x$ has the form $20n +3$. Multiplying,

$\tag 1 (20 + 7)(20n+3) \equiv 60 + 40n + 21 \equiv 81 + 40n \pmod{100}$

Examining $\text{(1)}$ we determine that $x \equiv 63 \pmod{100}$.

So

$\; 27^{2018} \equiv 27^{2020} \cdot 63^{2} \equiv 63 \cdot 63 \equiv 80 + 80 + 9 \equiv 69 \pmod{100}$.

CopyPasteIt
  • 11,366